Skip to content

Commit

Permalink
Find a temporary workaround concerning the CRD serialization issue. h…
Browse files Browse the repository at this point in the history
…alkyonio#476

Signed-off-by: cmoulliard <[email protected]>
  • Loading branch information
cmoulliard committed May 3, 2024
1 parent ec98766 commit fecbea0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 3 additions & 3 deletions app/src/main/crds/helm.crossplane.io_releases.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ spec:
managementPolicies:
# default:
# Removed it to check if error is gone: https://github.com/halkyonio/primaza-poc/issues/476
# - '*'
# - Create
description: 'THIS IS A BETA FIELD. It is on by default but can be
opted out through a Crossplane feature flag. ManagementPolicies
specify the array of actions Crossplane is allowed to take on the
Expand Down Expand Up @@ -774,8 +774,8 @@ spec:
- namespace
type: object
managementPolicies:
#default:
#- '*'
# default:
# - Create
description: 'THIS IS A BETA FIELD. It is on by default but can be
opted out through a Crossplane feature flag. ManagementPolicies
specify the array of actions Crossplane is allowed to take on the
Expand Down
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,10 @@ 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(ReleaseSpec.ManagementPolicies.CREATE, ReleaseSpec.ManagementPolicies.DELETE,
ReleaseSpec.ManagementPolicies.UPDATE, 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 fecbea0

Please sign in to comment.