diff --git a/charts/core-crd/Chart.yaml b/charts/core-crd/Chart.yaml index 3186380..d24ef95 100644 --- a/charts/core-crd/Chart.yaml +++ b/charts/core-crd/Chart.yaml @@ -2,8 +2,8 @@ apiVersion: v2 name: core-crd description: A Helm chart for Kubernetes type: application -version: 2.1.2 -appVersion: "v2.1.1" +version: 2.2.0 +appVersion: "v2.2.0" maintainers: - name: Calyptia email: hello@calyptia.com diff --git a/charts/core-crd/templates/_helpers.tpl b/charts/core-crd/templates/_helpers.tpl index d44be98..21e8ecc 100644 --- a/charts/core-crd/templates/_helpers.tpl +++ b/charts/core-crd/templates/_helpers.tpl @@ -8,4 +8,14 @@ {{- define "ingestCheck.image" -}} {{ include "common.images.image" (dict "imageRoot" .Values.images.ingestCheck "global" .Values.global) }} +{{- end -}} + +{{- define "validateServiceType" -}} +{{- $validTypes := list "NodePort" "LoadBalancer" "ClusterIP" -}} +{{- $type := .Values.pipelineServiceType | default "LoadBalancer" -}} +{{- if has $type $validTypes -}} +{{- $type -}} +{{- else -}} +LoadBalancer +{{- end -}} {{- end -}} \ No newline at end of file diff --git a/charts/core-crd/templates/pipelines.yaml b/charts/core-crd/templates/pipelines.yaml index 9397245..c08c6f2 100644 --- a/charts/core-crd/templates/pipelines.yaml +++ b/charts/core-crd/templates/pipelines.yaml @@ -175,7 +175,7 @@ spec: protocol: type: string serviceType: - default: LoadBalancer + default: {{ include "validateServiceType" . }} description: Service Type string describes ingress methods for a service type: string type: object diff --git a/charts/core-crd/tests/core-crd_test.yaml b/charts/core-crd/tests/core-crd_test.yaml new file mode 100644 index 0000000..7e94812 --- /dev/null +++ b/charts/core-crd/tests/core-crd_test.yaml @@ -0,0 +1,17 @@ +suite: Test core crd +release: + namespace: test +templates: + - pipelines.yaml + +tests: + - it: checks kind + set: + pipelineServiceType: ClusterIP + asserts: + - isKind: + of: CustomResourceDefinition + - equal: + path: spec.versions[0].schema.openAPIV3Schema.properties.spec.properties.ports.items.properties.serviceType.default + value: ClusterIP + \ No newline at end of file diff --git a/charts/core-crd/values.yaml b/charts/core-crd/values.yaml index 7700226..c713266 100644 --- a/charts/core-crd/values.yaml +++ b/charts/core-crd/values.yaml @@ -15,3 +15,4 @@ images: tag: 0.0.7 pullSecrets: [] cloudUrl: https://cloud-api.calyptia.com +pipelineServiceType: LoadBalancer diff --git a/charts/core-instance/Chart.yaml b/charts/core-instance/Chart.yaml index b2556b1..3b2b4cc 100644 --- a/charts/core-instance/Chart.yaml +++ b/charts/core-instance/Chart.yaml @@ -4,8 +4,8 @@ description: Calyptia Core Instance chart home: https://calyptia.com/products/core/ icon: https://storage.googleapis.com/calyptia_public_resources_bucket/logo-darkmode.svg type: application -version: 2.1.2 -appVersion: "v2.1.1" +version: 2.2.0 +appVersion: "v2.2.0" maintainers: - name: Calyptia email: hello@calyptia.com diff --git a/charts/core-instance/values.yaml b/charts/core-instance/values.yaml index ffc33f4..fcdde08 100644 --- a/charts/core-instance/values.yaml +++ b/charts/core-instance/values.yaml @@ -12,12 +12,12 @@ images: fromCloud: registry: ghcr.io repository: calyptia/core-operator/sync-from-cloud - tag: 2.1.1 + tag: 2.2.0 pullSecrets: [] toCloud: registry: ghcr.io repository: calyptia/core-operator/sync-to-cloud - tag: 2.1.1 + tag: 2.2.0 pullSecrets: [] hotReload: registry: ghcr.io diff --git a/charts/core-operator/Chart.yaml b/charts/core-operator/Chart.yaml index 7053adb..aa0343f 100644 --- a/charts/core-operator/Chart.yaml +++ b/charts/core-operator/Chart.yaml @@ -4,8 +4,8 @@ description: Calyptia Core Operator chart home: https://calyptia.com/products/core/ icon: https://storage.googleapis.com/calyptia_public_resources_bucket/logo-darkmode.svg type: application -version: 2.1.2 -appVersion: "v2.1.1" +version: 2.2.0 +appVersion: "v2.2.0" maintainers: - name: Calyptia email: hello@calyptia.com diff --git a/charts/core-operator/templates/role.yaml b/charts/core-operator/templates/role.yaml index a9b486a..91f26f9 100644 --- a/charts/core-operator/templates/role.yaml +++ b/charts/core-operator/templates/role.yaml @@ -19,6 +19,7 @@ rules: - rbac.authorization.k8s.io - security.openshift.io resources: + - events - namespaces - serviceaccounts - deployments diff --git a/charts/core-operator/values.yaml b/charts/core-operator/values.yaml index 1364d75..c5274f7 100644 --- a/charts/core-operator/values.yaml +++ b/charts/core-operator/values.yaml @@ -4,7 +4,7 @@ images: operator: registry: ghcr.io repository: calyptia/core-operator - tag: 2.1.1 + tag: 2.2.0 pullSecrets: [] hotReload: registry: ghcr.io