Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix helm templating issues #2006

Merged
merged 1 commit into from
Mar 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions helm-charts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ A Helm chart for APK components
| wso2.apk.dp.configdeployer.deployment.replicas | int | `1` | Number of replicas |
| wso2.apk.dp.configdeployer.deployment.imagePullPolicy | string | `"Always"` | Image pull policy |
| wso2.apk.dp.configdeployer.deployment.image | string | `"wso2/apk-config-deployer-service:1.1.0-m2"` | Image |
| wso2.apk.dp.configdeployer.deployment.configs.authrorization | bool | `true` | Enable authorization for runtime api. |
| wso2.apk.dp.configdeployer.deployment.configs.authorization | bool | `true` | Enable authorization for runtime api. |
| wso2.apk.dp.configdeployer.deployment.configs.baseUrl | string | `"https://api.am.wso2.com:9095/api/runtime"` | Baseurl for runtime api. |
| wso2.apk.dp.configdeployer.deployment.configs.tls.secretName | string | `""` | TLS secret name for runtime public certificate. |
| wso2.apk.dp.configdeployer.deployment.configs.tls.certKeyFilename | string | `""` | TLS certificate file name. |
Expand All @@ -102,10 +102,10 @@ A Helm chart for APK components
| wso2.apk.dp.adapter.deployment.imagePullPolicy | string | `"Always"` | Image pull policy |
| wso2.apk.dp.adapter.deployment.image | string | `"wso2/apk-adapter:1.1.0-m2"` | Image |
| wso2.apk.dp.adapter.deployment.security.sslHostname | string | `"adapter"` | Enable security for adapter. |
| wso2.apk.dp.adapter.configs.apiNamespaces | string | `nil` | Optionally configure namespaces to watch for apis. |
| wso2.apk.dp.adapter.configs.tls.secretName | string | `""` | TLS secret name for adapter public certificate. |
| wso2.apk.dp.adapter.configs.tls.certKeyFilename | string | `""` | TLS certificate file name. |
| wso2.apk.dp.adapter.configs.tls.certFilename | string | `""` | TLS certificate file name. |
| wso2.apk.dp.adapter.deployment.configs.apiNamespaces | string | `nil` | Optionally configure namespaces to watch for apis. |
| wso2.apk.dp.adapter.deployment.configs.tls.secretName | string | `""` | TLS secret name for adapter public certificate. |
| wso2.apk.dp.adapter.deployment.configs.tls.certKeyFilename | string | `""` | TLS certificate file name. |
| wso2.apk.dp.adapter.deployment.configs.tls.certFilename | string | `""` | TLS certificate file name. |
| wso2.apk.dp.adapter.logging.level | string | `"INFO"` | Optionally configure logging for adapter. LogLevels can be "DEBG", "FATL", "ERRO", "WARN", "INFO", "PANC" |
| wso2.apk.dp.adapter.logging.logFile | string | `"logs/adapter.log"` | Log file name |
| wso2.apk.dp.adapter.logging.logFormat | string | `"TEXT"` | Log format can be "JSON", "TEXT" |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ spec:
allowedSANs:
- {{ template "apk-helm.resource.prefix" . }}-config-ds-service.{{ .Release.Namespace }}.svc
secretRef:
{{- if and .Values.wso2.apk.dp.configdeployer.configs .Values.wso2.apk.dp.configdeployer.configs.tls }}
name: {{.Values.wso2.apk.dp.configdeployer.configs.tls.secretName}}
key: {{.Values.wso2.apk.dp.configdeployer.configs.tls.certFilename}}
{{- if and .Values.wso2.apk.dp.configdeployer.deployment.configs .Values.wso2.apk.dp.configdeployer.deployment.configs.tls }}
name: {{.Values.wso2.apk.dp.configdeployer.deployment.configs.tls.secretName}}
key: {{.Values.wso2.apk.dp.configdeployer.deployment.configs.tls.certFilename}}
{{- else }}
name: {{ template "apk-helm.resource.prefix" . }}-config-ds-server-cert
key: tls.crt
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,15 @@ spec:
subPath: prometheus-jmx-config-configds.yml
- name: config-ds-tls-volume
mountPath: /home/wso2apk/config-deployer/security/config.key
{{- if and .Values.wso2.apk.dp.configdeployer.configs .Values.wso2.apk.dp.configdeployer.configs.tls }}
subPath: {{ .Values.wso2.apk.dp.configdeployer.configs.tls.certKeyFilename | default "tls.key" }}
{{- if and .Values.wso2.apk.dp.configdeployer.deployment.configs .Values.wso2.apk.dp.configdeployer.deployment.configs.tls }}
subPath: {{ .Values.wso2.apk.dp.configdeployer.deployment.configs.tls.certKeyFilename | default "tls.key" }}
{{- else }}
subPath: tls.key
{{- end }}
- name: config-ds-tls-volume
mountPath: /home/wso2apk/config-deployer/security/config.pem
{{- if and .Values.wso2.apk.dp.configdeployer.configs .Values.wso2.apk.dp.configdeployer.configs.tls }}
subPath: {{ .Values.wso2.apk.dp.configdeployer.configs.tls.certFilename | default "tls.crt" }}
{{- if and .Values.wso2.apk.dp.configdeployer.deployment.configs .Values.wso2.apk.dp.configdeployer.deployment.configs.tls }}
subPath: {{ .Values.wso2.apk.dp.configdeployer.deployment.configs.tls.certFilename | default "tls.crt" }}
{{- else }}
subPath: tls.crt
{{- end }}
Expand Down Expand Up @@ -119,8 +119,8 @@ spec:
name: prometheus-jmx-config-configds
- name: config-ds-tls-volume
secret:
{{ if and .Values.wso2.apk.dp.configdeployer.configs .Values.wso2.apk.dp.configdeployer.configs.tls }}
secretName: {{ .Values.wso2.apk.dp.configdeployer.configs.tls.secretName | default (printf "%s-config-ds-server-cert" (include "apk-helm.resource.prefix" .)) }}
{{ if and .Values.wso2.apk.dp.configdeployer.deployment.configs .Values.wso2.apk.dp.configdeployer.deployment.configs.tls }}
secretName: {{ .Values.wso2.apk.dp.configdeployer.deployment.configs.tls.secretName | default (printf "%s-config-ds-server-cert" (include "apk-helm.resource.prefix" .)) }}
{{ else }}
secretName: {{ template "apk-helm.resource.prefix" . }}-config-ds-server-cert
{{ end }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ spec:
allowedSANs:
- {{ template "apk-helm.resource.prefix" . }}-config-ds-service.{{ .Release.Namespace }}.svc
secretRef:
{{- if and .Values.wso2.apk.dp.configdeployer.configs .Values.wso2.apk.dp.configdeployer.configs.tls }}
name: {{.Values.wso2.apk.dp.configdeployer.configs.tls.secretName}}
key: {{.Values.wso2.apk.dp.configdeployer.configs.tls.certFilename}}
{{- if and .Values.wso2.apk.dp.configdeployer.deployment.configs .Values.wso2.apk.dp.configdeployer.deployment.configs.tls }}
name: {{.Values.wso2.apk.dp.configdeployer.deployment.configs.tls.secretName}}
key: {{.Values.wso2.apk.dp.configdeployer.deployment.configs.tls.certFilename}}
{{- else }}
name: {{ template "apk-helm.resource.prefix" . }}-config-ds-server-cert
key: tls.crt
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,22 +65,22 @@ spec:
volumeMounts:
- name: adapter-keystore-secret-volume
mountPath: /home/wso2/security/keystore/adapter.key
{{- if and .Values.wso2.apk.dp.adapter.configs .Values.wso2.apk.dp.adapter.configs.tls }}
subPath: {{ .Values.wso2.apk.dp.adapter.configs.tls.certKeyFilename | default "tls.key" }}
{{- if and .Values.wso2.apk.dp.adapter.deployment.configs .Values.wso2.apk.dp.adapter.deployment.configs.tls }}
subPath: {{ .Values.wso2.apk.dp.adapter.deployment.configs.tls.certKeyFilename | default "tls.key" }}
{{- else }}
subPath: tls.key
{{- end }}
- name: adapter-keystore-secret-volume
mountPath: /home/wso2/security/keystore/adapter.crt
{{- if and .Values.wso2.apk.dp.adapter.configs .Values.wso2.apk.dp.adapter.configs.tls }}
subPath: {{ .Values.wso2.apk.dp.adapter.configs.tls.certFilename | default "tls.crt" }}
{{- if and .Values.wso2.apk.dp.adapter.deployment.configs .Values.wso2.apk.dp.adapter.deployment.configs.tls }}
subPath: {{ .Values.wso2.apk.dp.adapter.deployment.configs.tls.certFilename | default "tls.crt" }}
{{- else }}
subPath: tls.crt
{{- end }}
- name: adapter-keystore-secret-volume
mountPath: /home/wso2/security/truststore/adapter-ca.crt
{{- if and .Values.wso2.apk.dp.adapter.configs .Values.wso2.apk.dp.adapter.configs.tls }}
subPath: {{ .Values.wso2.apk.dp.adapter.configs.tls.certFilename | default "ca.crt" }}
{{- if and .Values.wso2.apk.dp.adapter.deployment.configs .Values.wso2.apk.dp.adapter.deployment.configs.tls }}
subPath: {{ .Values.wso2.apk.dp.adapter.deployment.configs.tls.certFilename | default "ca.crt" }}
{{- else }}
subPath: ca.crt
{{- end }}
Expand Down Expand Up @@ -138,8 +138,8 @@ spec:
volumes:
- name: adapter-keystore-secret-volume
secret:
{{- if and .Values.wso2.apk.dp.adapter.configs .Values.wso2.apk.dp.adapter.configs.tls }}
secretName: {{ .Values.wso2.apk.dp.adapter.configs.tls.secretName | default (printf "%s-adapter-server-cert" (include "apk-helm.resource.prefix" .)) }}
{{- if and .Values.wso2.apk.dp.adapter.deployment.configs .Values.wso2.apk.dp.adapter.deployment.configs.tls }}
secretName: {{ .Values.wso2.apk.dp.adapter.deployment.configs.tls.secretName | default (printf "%s-adapter-server-cert" (include "apk-helm.resource.prefix" .)) }}
{{- else }}
secretName: {{ template "apk-helm.resource.prefix" . }}-adapter-server-cert
{{- end }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,22 +67,22 @@ spec:
volumeMounts:
- name: common-controller-keystore-secret-volume
mountPath: /home/wso2/security/keystore/commoncontroller.key
{{- if and .Values.wso2.apk.dp.commonController.configs .Values.wso2.apk.dp.commonController.configs.tls }}
subPath: {{ .Values.wso2.apk.dp.commonController.configs.tls.certKeyFilename | default "tls.key" }}
{{- if and .Values.wso2.apk.dp.commonController.deployment.configs .Values.wso2.apk.dp.commonController.deployment.configs.tls }}
subPath: {{ .Values.wso2.apk.dp.commonController.deployment.configs.tls.certKeyFilename | default "tls.key" }}
{{- else }}
subPath: tls.key
{{- end }}
- name: common-controller-keystore-secret-volume
mountPath: /home/wso2/security/keystore/commoncontroller.crt
{{- if and .Values.wso2.apk.dp.commonController.configs .Values.wso2.apk.dp.commonController.configs.tls }}
subPath: {{ .Values.wso2.apk.dp.commonController.configs.tls.certFilename | default "tls.crt" }}
{{- if and .Values.wso2.apk.dp.commonController.deployment.configs .Values.wso2.apk.dp.commonController.deployment.configs.tls }}
subPath: {{ .Values.wso2.apk.dp.commonController.deployment.configs.tls.certFilename | default "tls.crt" }}
{{- else }}
subPath: tls.crt
{{- end }}
- name: common-controller-keystore-secret-volume
mountPath: /home/wso2/security/truststore/adapter-ca.crt
{{- if and .Values.wso2.apk.dp.commonController.configs .Values.wso2.apk.dp.commonController.configs.tls }}
subPath: {{ .Values.wso2.apk.dp.commonController.configs.tls.certFilename | default "ca.crt" }}
{{- if and .Values.wso2.apk.dp.commonController.deployment.configs .Values.wso2.apk.dp.commonController.deployment.configs.tls }}
subPath: {{ .Values.wso2.apk.dp.commonController.deployment.configs.tls.certFilename | default "ca.crt" }}
{{- else }}
subPath: ca.crt
{{- end }}
Expand All @@ -91,15 +91,15 @@ spec:
# mountPath: /home/wso2/security/truststore/enforcer.crt
- name: ratelimiter-truststore-secret-volume
mountPath: /home/wso2/security/truststore/ratelimiter.crt
{{- if and .Values.wso2.apk.dp.ratelimiter.configs .Values.wso2.apk.dp.ratelimiter.configs.tls }}
subPath: {{ .Values.wso2.apk.dp.ratelimiter.configs.tls.certFilename | default "tls.crt" }}
{{- if and .Values.wso2.apk.dp.ratelimiter.deployment.configs .Values.wso2.apk.dp.ratelimiter.deployment.configs.tls }}
subPath: {{ .Values.wso2.apk.dp.ratelimiter.deployment.configs.tls.certFilename | default "tls.crt" }}
{{- else }}
subPath: tls.crt
{{- end }}
- name: ratelimiter-truststore-secret-volume
mountPath: /home/wso2/security/truststore/ca-ratelimiter.crt
{{- if and .Values.wso2.apk.dp.ratelimiter.configs .Values.wso2.apk.dp.ratelimiter.configs.tls }}
subPath: {{ .Values.wso2.apk.dp.ratelimiter.configs.tls.certCAFilename | default "ca.crt" }}
{{- if and .Values.wso2.apk.dp.ratelimiter.deployment.configs .Values.wso2.apk.dp.ratelimiter.deployment.configs.tls }}
subPath: {{ .Values.wso2.apk.dp.ratelimiter.deployment.configs.tls.certCAFilename | default "ca.crt" }}
{{- else }}
subPath: ca.crt
{{- end }}
Expand Down Expand Up @@ -140,8 +140,8 @@ spec:
volumes:
- name: common-controller-keystore-secret-volume
secret:
{{- if and .Values.wso2.apk.dp.commonController.configs .Values.wso2.apk.dp.commonController.configs.tls }}
secretName: {{ .Values.wso2.apk.dp.commonController.configs.tls.secretName | default (printf "%s-common-controller-server-cert" (include "apk-helm.resource.prefix" .)) }}
{{- if and .Values.wso2.apk.dp.commonController.deployment.configs .Values.wso2.apk.dp.commonController.deployment.configs.tls }}
secretName: {{ .Values.wso2.apk.dp.commonController.deployment.configs.tls.secretName | default (printf "%s-common-controller-server-cert" (include "apk-helm.resource.prefix" .)) }}
{{- else }}
secretName: {{ template "apk-helm.resource.prefix" . }}-common-controller-server-cert
{{- end }}
Expand All @@ -160,8 +160,8 @@ spec:
{{ if and .Values.wso2.apk.dp.enabled .Values.wso2.apk.dp.ratelimiter.enabled }}
- name: ratelimiter-truststore-secret-volume
secret:
{{- if and .Values.wso2.apk.dp.ratelimiter.configs .Values.wso2.apk.dp.ratelimiter.configs.tls }}
secretName: {{ .Values.wso2.apk.dp.ratelimiter.configs.tls.secretName | default (printf "%s-ratelimiter-server-cert" (include "apk-helm.resource.prefix" .)) }}
{{- if and .Values.wso2.apk.dp.ratelimiter.deployment.configs .Values.wso2.apk.dp.ratelimiter.deployment.configs.tls }}
secretName: {{ .Values.wso2.apk.dp.ratelimiter.deployment.configs.tls.secretName | default (printf "%s-ratelimiter-server-cert" (include "apk-helm.resource.prefix" .)) }}
{{- else }}
secretName: {{ template "apk-helm.resource.prefix" . }}-ratelimiter-server-cert
{{- end }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ data:
{{ end}}
[commoncontroller.server]
label = "ratelimiter"
{{ if and .Values.wso2.apk.dp.commonController.configs .Values.wso2.apk.dp.commonController.configs.apiNamespaces }}
{{ if and .Values.wso2.apk.dp.commonController.deployment.configs .Values.wso2.apk.dp.commonController.deployment.configs.apiNamespaces }}
[commoncontroller.operator]
namespaces = [{{ include "commaJoinedQuotedList" .Values.wso2.apk.dp.commonController.configs.apiNamespaces}}]
namespaces = [{{ include "commaJoinedQuotedList" .Values.wso2.apk.dp.commonController.deployment.configs.apiNamespaces}}]
{{ end}}
[commoncontroller.keystore]
certPath = "/home/wso2/security/keystore/commoncontroller.crt"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,8 @@ spec:
{{- end }}
- name: adapter-truststore-secret-volume
mountPath: /home/wso2/security/truststore/adapter.crt
{{- if and .Values.wso2.apk.dp.adapter.configs .Values.wso2.apk.dp.adapter.configs.tls }}
subPath: {{ .Values.wso2.apk.dp.adapter.configs.tls.certFilename | default "tls.crt" }}
{{- if and .Values.wso2.apk.dp.adapter.deployment.configs .Values.wso2.apk.dp.adapter.deployment.configs.tls }}
subPath: {{ .Values.wso2.apk.dp.adapter.deployment.configs.tls.certFilename | default "tls.crt" }}
{{- else }}
subPath: tls.crt
{{- end }}
Expand Down Expand Up @@ -316,8 +316,8 @@ spec:
{{- end }}
- name: adapter-truststore-secret-volume
mountPath: /home/wso2/security/truststore/adapter.crt
{{- if and .Values.wso2.apk.dp.adapter.configs .Values.wso2.apk.dp.adapter.configs.tls }}
subPath: {{ .Values.wso2.apk.dp.adapter.configs.tls.certFilename | default "tls.crt" }}
{{- if and .Values.wso2.apk.dp.adapter.deployment.configs .Values.wso2.apk.dp.adapter.deployment.configs.tls }}
subPath: {{ .Values.wso2.apk.dp.adapter.deployment.configs.tls.certFilename | default "tls.crt" }}
{{- else }}
subPath: tls.crt
{{- end }}
Expand All @@ -333,15 +333,15 @@ spec:
{{ if and .Values.wso2.apk.dp.enabled .Values.wso2.apk.dp.ratelimiter.enabled }}
- name: ratelimiter-truststore-secret-volume
mountPath: /home/wso2/security/truststore/ratelimiter.crt
{{- if and .Values.wso2.apk.dp.ratelimiter.configs .Values.wso2.apk.dp.ratelimiter.configs.tls }}
subPath: {{ .Values.wso2.apk.dp.ratelimiter.configs.tls.certFilename | default "tls.crt" }}
{{- if and .Values.wso2.apk.dp.ratelimiter.deployment.configs .Values.wso2.apk.dp.ratelimiter.deployment.configs.tls }}
subPath: {{ .Values.wso2.apk.dp.ratelimiter.deployment.configs.tls.certFilename | default "tls.crt" }}
{{- else }}
subPath: tls.crt
{{- end }}
- name: ratelimiter-truststore-secret-volume
mountPath: /home/wso2/security/truststore/ratelimiter-ca.crt
{{- if and .Values.wso2.apk.dp.ratelimiter.configs .Values.wso2.apk.dp.ratelimiter.configs.tls }}
subPath: {{ .Values.wso2.apk.dp.ratelimiter.configs.tls.certCAFilename | default "ca.crt" }}
{{- if and .Values.wso2.apk.dp.ratelimiter.deployment.configs .Values.wso2.apk.dp.ratelimiter.deployment.configs.tls }}
subPath: {{ .Values.wso2.apk.dp.ratelimiter.deployment.configs.tls.certCAFilename | default "ca.crt" }}
{{- else }}
subPath: ca.crt
{{- end }}
Expand Down Expand Up @@ -381,8 +381,8 @@ spec:
{{ if and .Values.wso2.apk.dp.enabled .Values.wso2.apk.dp.ratelimiter.enabled }}
- name: ratelimiter-truststore-secret-volume
secret:
{{- if and .Values.wso2.apk.dp.ratelimiter.configs .Values.wso2.apk.dp.ratelimiter.configs.tls }}
secretName: {{ .Values.wso2.apk.dp.ratelimiter.configs.tls.certificatesSecret | default (printf "%s-ratelimiter-server-cert" (include "apk-helm.resource.prefix" .)) }}
{{- if and .Values.wso2.apk.dp.ratelimiter.deployment.configs .Values.wso2.apk.dp.ratelimiter.deployment.configs.tls }}
secretName: {{ .Values.wso2.apk.dp.ratelimiter.deployment.configs.tls.certificatesSecret | default (printf "%s-ratelimiter-server-cert" (include "apk-helm.resource.prefix" .)) }}
{{- else }}
secretName: {{ template "apk-helm.resource.prefix" . }}-ratelimiter-server-cert
{{- end }}
Expand Down Expand Up @@ -419,8 +419,8 @@ spec:
{{- end }}
- name: adapter-truststore-secret-volume
secret:
{{- if and .Values.wso2.apk.dp.adapter.configs .Values.wso2.apk.dp.adapter.configs.tls }}
secretName: {{ .Values.wso2.apk.dp.adapter.configs.tls.secretName | default (printf "%s-adapter-server-cert" (include "apk-helm.resource.prefix" .)) }}
{{- if and .Values.wso2.apk.dp.adapter.deployment.configs .Values.wso2.apk.dp.adapter.deployment.configs.tls }}
secretName: {{ .Values.wso2.apk.dp.adapter.deployment.configs.tls.secretName | default (printf "%s-adapter-server-cert" (include "apk-helm.resource.prefix" .)) }}
{{- else }}
secretName: {{ template "apk-helm.resource.prefix" . }}-adapter-server-cert
{{- end }}
Expand Down
Loading
Loading