Skip to content

Commit

Permalink
Define the managementPolicies
Browse files Browse the repository at this point in the history
Signed-off-by: cmoulliard <[email protected]>
  • Loading branch information
cmoulliard committed May 2, 2024
1 parent 51bc305 commit 116d272
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

import io.crossplane.helm.v1beta1.Release;
import io.crossplane.helm.v1beta1.ReleaseBuilder;
import io.crossplane.helm.v1beta1.ReleaseSpec;
import io.fabric8.kubernetes.api.model.ContainerBuilder;
import io.fabric8.kubernetes.api.model.HasMetadata;
import io.fabric8.kubernetes.api.model.KubernetesResourceList;
Expand Down Expand Up @@ -249,7 +250,11 @@ public void createCrossplaneHelmRelease(Cluster cluster, io.halkyon.model.Servic
.endSet().addNewSet().withName("auth.password").withValue("healthy").endSet()
.withNamespace(service.namespace).withWait(true).withNewChart().withName(service.helmChart)
.withRepository(service.helmRepo).withVersion(service.helmChartVersion).endChart().endForProvider()
.withNewProviderConfigRef().withName("helm-provider").endProviderConfigRef().endSpec();
.withNewProviderConfigRef().withName("helm-provider").endProviderConfigRef()
.withManagementPolicies()
.addToManagementPolicies(ReleaseSpec.ManagementPolicies.CREATE)
.addToManagementPolicies(ReleaseSpec.ManagementPolicies.DELETE)
.addToManagementPolicies(ReleaseSpec.ManagementPolicies.OBSERVE).endSpec();

// TODO: Logic to be reviewed as we have 2 use cases:
// Service(s) instances has been discovered in cluster x.y.z
Expand Down

0 comments on commit 116d272

Please sign in to comment.