Skip to content

Commit

Permalink
Review the code to clean some comments non needed and add some TODO f…
Browse files Browse the repository at this point in the history
…or the ticket. halkyonio#476

Signed-off-by: cmoulliard <[email protected]>
  • Loading branch information
cmoulliard committed May 3, 2024
1 parent a40c292 commit e95c8a4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 21 deletions.
15 changes: 0 additions & 15 deletions app/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -230,21 +230,6 @@
<configuration>
<extraAnnotations>true</extraAnnotations>
<source>src/main/crds</source>
<!-- crds added to src/main/crds
<urls>
&lt;!&ndash; Primaza CRDs &ndash;&gt;
<url>https://raw.githubusercontent.com/primaza/primaza/main/config/crd/bases/primaza.io_clusterenvironments.yaml</url>
<url>https://raw.githubusercontent.com/primaza/primaza/main/config/crd/bases/primaza.io_registeredservices.yaml</url>
<url>https://raw.githubusercontent.com/primaza/primaza/main/config/crd/bases/primaza.io_servicebindings.yaml</url>
<url>https://raw.githubusercontent.com/primaza/primaza/main/config/crd/bases/primaza.io_servicecatalogs.yaml</url>
<url>https://raw.githubusercontent.com/primaza/primaza/main/config/crd/bases/primaza.io_serviceclaims.yaml</url>
<url>https://raw.githubusercontent.com/primaza/primaza/main/config/crd/bases/primaza.io_serviceclasses.yaml</url>
&lt;!&ndash; Crossplane Helm release able to deploy a helm chart &ndash;&gt;
&lt;!&ndash; Revert to an old version of the CRD as we got a class cast exception using ManagedPolicies field introduced recently &ndash;&gt;
&lt;!&ndash;<url>https://raw.githubusercontent.com/crossplane-contrib/provider-helm/v0.14.0/package/crds/helm.crossplane.io_releases.yaml</url>&ndash;&gt;
<url>https://raw.githubusercontent.com/crossplane-contrib/provider-helm/v0.18.1/package/crds/helm.crossplane.io_releases.yaml</url>
</urls>
-->
</configuration>
</plugin>
</plugins>
Expand Down
8 changes: 3 additions & 5 deletions app/src/main/crds/helm.crossplane.io_releases.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# TODO: This CRD is based on the release v0.18.1: https://github.com/crossplane-contrib/provider-helm/releases/tag/v0.18.1
# but has been hacked to propose a workaround reported here: https://github.com/halkyonio/primaza-poc/issues/476
# The default property of the ManagementPolicies has been commented till a fix will be provided by fabric8 kubernetes client
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
Expand Down Expand Up @@ -265,11 +268,6 @@ spec:
- Update
- Delete
- LateInitialize
# Removed it to check if error is gone: https://github.com/halkyonio/primaza-poc/issues/476
# Code generated is:
# public class ReleaseSpec implements io.fabric8.kubernetes.api.model.KubernetesResource {
# ...
# private java.util.List<ManagementPolicies> managementPolicies = io.fabric8.kubernetes.client.utils.Serialization.unmarshal("[\"*\"]", java.util.List.class);
- '*'
type: string
type: array
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ public void createCrossplaneHelmRelease(Cluster cluster, io.halkyon.model.Servic
.withNamespace(service.namespace).withWait(true).withNewChart().withName(service.helmChart)
.withRepository(service.helmRepo).withVersion(service.helmChartVersion).endChart().endForProvider()
.withNewProviderConfigRef().withName("helm-provider").endProviderConfigRef()
/*
/* TODO: Remove or keep the code when issue https://github.com/halkyonio/primaza-poc/issues/476 will be fixed
* .withManagementPolicies(ReleaseSpec.ManagementPolicies.CREATE, ReleaseSpec.ManagementPolicies.DELETE,
* ReleaseSpec.ManagementPolicies.UPDATE, ReleaseSpec.ManagementPolicies.OBSERVE)
*/
Expand Down

0 comments on commit e95c8a4

Please sign in to comment.