Merge pull request #3050 from Infisical/daniel/k8-logs

feat(k8-operator): better error status
This commit is contained in:
Daniel Hougaard
2025-01-27 23:53:23 +01:00
committed by GitHub
3 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -13,9 +13,9 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes # This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version. # to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/) # Versions are expected to follow Semantic Versioning (https://semver.org/)
version: v0.8.6 version: v0.8.7
# This is the version number of the application being deployed. This version number should be # This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to # incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using. # follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes. # It is recommended to use it with quotes.
appVersion: "v0.8.6" appVersion: "v0.8.7"
+1 -1
View File
@@ -32,7 +32,7 @@ controllerManager:
- ALL - ALL
image: image:
repository: infisical/kubernetes-operator repository: infisical/kubernetes-operator
tag: v0.8.6 tag: v0.8.7
resources: resources:
limits: limits:
cpu: 500m cpu: 500m
@@ -21,14 +21,14 @@ func (r *InfisicalSecretReconciler) SetReadyToSyncSecretsConditions(ctx context.
Type: "secrets.infisical.com/ReadyToSyncSecrets", Type: "secrets.infisical.com/ReadyToSyncSecrets",
Status: metav1.ConditionFalse, Status: metav1.ConditionFalse,
Reason: "Error", Reason: "Error",
Message: "Failed to sync secrets. This can be caused by invalid service token or an invalid API host that is set. Check operator logs for more info", Message: fmt.Sprintf("Failed to sync secrets. This can be caused by invalid access token or an invalid API host that is set. Error: %v", errorToConditionOn),
}) })
meta.SetStatusCondition(&infisicalSecret.Status.Conditions, metav1.Condition{ meta.SetStatusCondition(&infisicalSecret.Status.Conditions, metav1.Condition{
Type: "secrets.infisical.com/AutoRedeployReady", Type: "secrets.infisical.com/AutoRedeployReady",
Status: metav1.ConditionFalse, Status: metav1.ConditionFalse,
Reason: "Stopped", Reason: "Stopped",
Message: "Auto redeployment has been stopped because the operator failed to sync secrets", Message: fmt.Sprintf("Auto redeployment has been stopped because the operator failed to sync secrets. Error: %v", errorToConditionOn),
}) })
} else { } else {
meta.SetStatusCondition(&infisicalSecret.Status.Conditions, metav1.Condition{ meta.SetStatusCondition(&infisicalSecret.Status.Conditions, metav1.Condition{