Skip to content

Commit

Permalink
Merge pull request #150 from raffaelespazzoli/fixes#137
Browse files Browse the repository at this point in the history
fixes #137
  • Loading branch information
raffaelespazzoli authored May 27, 2023
2 parents 3d8d95b + 46ad166 commit d869dc2
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions config/local-development/vault-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ ui:
enabled: true

injector:
enabled: false
image:
repository: "registry.connect.redhat.com/hashicorp/vault-k8s"
tag: "1.2.0-ubi"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func (r *VaultEngineResource) manageCleanUpLogic(context context.Context, instan
// we delete this only if it has actually been created. We assume that if there was a successful reconcyle cycle the resource was created in Vault
if conditionAware, ok := instance.(apis.ConditionsAware); ok {
for _, condition := range conditionAware.GetConditions() {
if condition.Status == metav1.ConditionTrue && condition.Type == apis.ReconcileSuccess {
if condition.Status == metav1.ConditionTrue && condition.Type == ReconcileSuccessful {
err := r.vaultEngineEndpoint.DeleteIfExists(context)
if err != nil {
log.Error(err, "unable to delete vault resource", "instance", instance)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func (r *VaultPKIEngineResource) manageCleanUpLogic(context context.Context, ins
log := log.FromContext(context)
if conditionAware, ok := instance.(apis.ConditionsAware); ok {
for _, condition := range conditionAware.GetConditions() {
if condition.Status == metav1.ConditionTrue && condition.Type == apis.ReconcileSuccess {
if condition.Status == metav1.ConditionTrue && condition.Type == ReconcileSuccessful {
log.Info("DeleteIfExists", "Try to: ", instance)
err := r.vaultPKIEngineEndpoint.DeleteIfExists(context)
if err != nil {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ func (r *VaultResource) manageCleanUpLogic(context context.Context, instance cli
log := log.FromContext(context)
if conditionAware, ok := instance.(apis.ConditionsAware); ok {
for _, condition := range conditionAware.GetConditions() {
if condition.Status == metav1.ConditionTrue && condition.Type == apis.ReconcileSuccess {
if condition.Status == metav1.ConditionTrue && condition.Type == ReconcileSuccessful {
err := r.vaultEndpoint.DeleteIfExists(context)
if err != nil {
log.Error(err, "unable to delete vault resource", "instance", instance)
Expand Down

0 comments on commit d869dc2

Please sign in to comment.