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

Common place for cp related config in helm template #2270

Merged
merged 3 commits into from
Apr 4, 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
12 changes: 5 additions & 7 deletions helm-charts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ A Helm chart for APK components
| wso2.apk.idp.signing.configMapName | string | `""` | IDP jwt signing certificate configmap name |
| wso2.apk.idp.signing.secretName | string | `""` | IDP jwt signing certificate secret name |
| wso2.apk.idp.signing.fileName | string | `""` | IDP jwt signing certificate file name |
| wso2.apk.cp.enableApiPropagation | bool | `false` | Enable controlplane connection |
| wso2.apk.cp.enabledSubscription | bool | `false` | Enable controlplane connection |
| wso2.apk.cp.host | string | `"apim-apk-agent-service.apk.svc.cluster.local"` | Hostname of the APK agent service |
| wso2.apk.cp.skipSSLVerification | bool | `false` | Skip SSL verification |
| wso2.apk.cp.persistence | object | `{"type":"K8s"}` | Provide persistence mode DB/K8s |
| wso2.apk.dp.enabled | bool | `true` | Enable the deployment of the Data Plane |
| wso2.apk.dp.environment.name | string | `"Development"` | Environment Name of the Data Plane |
| wso2.apk.dp.gatewayClass | object | `{"name":"wso2-apk-default"}` | GatewayClass custom resource name |
Expand Down Expand Up @@ -134,13 +139,6 @@ A Helm chart for APK components
| wso2.apk.dp.commonController.deployment.redis.userKeyPath | string | `"/home/wso2/security/keystore/commoncontroller.key"` | Redis user key to use for redis connections |
| wso2.apk.dp.commonController.deployment.redis.cACertPath | string | `"/home/wso2/security/keystore/commoncontroller.crt"` | Redis CA cert to use for redis connections |
| wso2.apk.dp.commonController.deployment.redis.channelName | string | `"wso2-apk-revoked-tokens-channel"` | Token revocation subscription channel name |
| wso2.apk.dp.commonController.deployment.controlplane.enabled | bool | `false` | Enable controlplane connection |
| wso2.apk.dp.commonController.deployment.controlplane.host | string | `"apim-apk-agent-service.apk.svc.cluster.local"` | Hostname of the APK agent service |
| wso2.apk.dp.commonController.deployment.controlplane.eventPort | int | `18000` | Port of the APK agent service for events |
| wso2.apk.dp.commonController.deployment.controlplane.skipSSLVerification | bool | `false` | Skip SSL verification |
| wso2.apk.dp.commonController.deployment.controlplane.persistence | object | `{"type":"K8s"}` | Provide persistence mode DB/K8s |
| wso2.apk.dp.commonController.deployment.database.enabled | bool | `false` | Enable Database mode for persistence |
| wso2.apk.dp.commonController.deployment.database.name | string | `"DATAPLANE"` | name of the database containing controlplane data for the use of dataplane |
| wso2.apk.dp.commonController.deployment.database.host | string | `"wso2apk-db-service.apk"` | |
| wso2.apk.dp.commonController.deployment.database.port | int | `5432` | |
| wso2.apk.dp.commonController.deployment.database.username | string | `"wso2carbon"` | |
Expand Down
11 changes: 7 additions & 4 deletions helm-charts/in-place-upgrade-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,13 @@ wso2:
# jwksEndpoint: "https://idp.am.wso2.com:9095/oauth2/jwks"
# secretName: "wso2apk-idp-signing"
# fileName: "idp.crt"
# cp:
# enableApiPropagation: false
# enabledSubscription: false
# host: "apim-apk-agent-service.apk.svc.cluster.local"
# skipSSLVerification: false
# persistence:
# type: "K8s"
dp:
enabled: true
gateway:
Expand Down Expand Up @@ -149,10 +156,6 @@ wso2:
image: wso2/apk-common-controller:latest
security:
sslHostname: "commoncontroller"
# controlplane:
# enabled: true
# host: "apim-apk-agent-service.apk.svc.cluster.local"
# skipSSLVerification: true
# configs:
# apiNamespaces:
# - "apk-v12"
Expand Down
8 changes: 4 additions & 4 deletions helm-charts/sample/apk/cp-enabled-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ wso2:
# jwksEndpoint: "https://idp.am.wso2.com:9095/oauth2/jwks"
# secretName: "wso2apk-idp-signing"
# fileName: "idp.crt"
cp:
enabledSubscription: true
host: "apim-apk-agent-service.apk.svc.cluster.local"
skipSSLVerification: false
dp:
enabled: true
gateway:
Expand Down Expand Up @@ -147,10 +151,6 @@ wso2:
image: wso2/apk-common-controller:1.1.0-beta
security:
sslHostname: "commoncontroller"
controlplane:
enabled: true
host: "apim-apk-agent-service.apk.svc.cluster.local"
skipSSLVerification: true
# configs:
# apiNamespaces:
# - "apk-v12"
Expand Down
12 changes: 4 additions & 8 deletions helm-charts/sample/apk/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ wso2:
# secretName: "wso2apk-idp-signing"
# fileName: "idp.crt"
cp:
controlplane:
enableApiPropagation: true
host: "apim-apk-agent-service.apk.svc.cluster.local"
skipSSLVerification: true
enableApiPropagation: true
enabledSubscription: true
host: "apim-apk-agent-service.apk.svc.cluster.local"
skipSSLVerification: true
dp:
enabled: true
gateway:
Expand Down Expand Up @@ -152,10 +152,6 @@ wso2:
image: wso2/apk-common-controller:1.1.0-beta
security:
sslHostname: "commoncontroller"
controlplane:
enabled: true
host: "apim-apk-agent-service.apk.svc.cluster.local"
skipSSLVerification: true
# configs:
# apiNamespaces:
# - "apk-v12"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# The following manifests contain a self-signed issuer CR and a certificate CR.
# More document can be found at https://docs.cert-manager.io

{{- if or .Values.wso2.apk.dp.enabled .Values.wso2.apk.cp.enabled }}
{{- if .Values.wso2.apk.dp.enabled }}
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# The following manifests contain a self-signed issuer CR and a certificate CR.
# More document can be found at https://docs.cert-manager.io

{{- if or .Values.wso2.apk.dp.enabled .Values.wso2.apk.cp.enabled }}
{{- if .Values.wso2.apk.dp.enabled }}
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# The following manifests contain a self-signed issuer CR and a certificate CR.
# More document can be found at https://docs.cert-manager.io

{{- if or .Values.wso2.apk.dp.enabled .Values.wso2.apk.cp.enabled }}
{{- if .Values.wso2.apk.dp.enabled }}
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# The following manifests contain a self-signed issuer CR and a certificate CR.
# More document can be found at https://docs.cert-manager.io

{{- if or .Values.wso2.apk.dp.enabled .Values.wso2.apk.cp.enabled }}
{{- if .Values.wso2.apk.dp.enabled }}
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# The following manifests contain a self-signed issuer CR and a certificate CR.
# More document can be found at https://docs.cert-manager.io

{{- if or .Values.wso2.apk.dp.enabled .Values.wso2.apk.cp.enabled }}
{{- if .Values.wso2.apk.dp.enabled }}
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# specific language governing permissions and limitations
# under the License.

{{- if or .Values.wso2.apk.dp.enabled .Values.wso2.apk.cp.enabled }}
{{- if .Values.wso2.apk.dp.enabled }}
apiVersion: apps/v1
kind: Deployment
metadata:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
# -----------------------------------------------------------------------
{{ if or .Values.wso2.apk.dp.enabled .Values.wso2.apk.cp.enabled }}
{{- if .Values.wso2.apk.dp.enabled }}
apiVersion: v1
kind: ConfigMap
metadata:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# specific language governing permissions and limitations
# under the License.

{{ if or .Values.wso2.apk.dp.enabled .Values.wso2.apk.cp.enabled }}
{{- if .Values.wso2.apk.dp.enabled }}
apiVersion: v1
kind: Service
metadata:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{ if or .Values.wso2.apk.dp.enabled .Values.wso2.apk.cp.enabled }}
{{- if .Values.wso2.apk.dp.enabled }}
apiVersion: v1
kind: Secret
metadata:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{{- if or .Values.wso2.apk.dp.enabled .Values.wso2.apk.cp.enabled }}
# Copyright (c) 2024, WSO2 LLC. (https://www.wso2.com) All Rights Reserved.
#
# WSO2 LLC. licenses this file to you under the Apache License,
Expand All @@ -14,7 +13,7 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

{{- if .Values.wso2.apk.dp.enabled }}
apiVersion: gateway.networking.k8s.io/v1
kind: GatewayClass
metadata:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if or .Values.wso2.apk.dp.enabled .Values.wso2.apk.cp.enabled }}
{{- if .Values.wso2.apk.dp.enabled }}
apiVersion: gateway.networking.k8s.io/v1
kind: Gateway
metadata:
Expand All @@ -19,7 +19,7 @@ spec:
port: {{ .Values.wso2.apk.dp.gateway.httpListener.port | default 9080}}
protocol: HTTP
{{ end }}
{{ if or .Values.wso2.apk.dp.enabled .Values.wso2.apk.cp.enabled }}
{{- if .Values.wso2.apk.dp.enabled }}
- name: httpslistener
hostname: "{{ .Values.wso2.apk.listener.hostname | default "api.am.wso2.com"}}"
port: 9095
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# specific language governing permissions and limitations
# under the License.

{{- if or .Values.wso2.apk.dp.enabled .Values.wso2.apk.cp.enabled }}
{{- if .Values.wso2.apk.dp.enabled }}
apiVersion: apps/v1
kind: Deployment
metadata:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
# -----------------------------------------------------------------------
{{ if or .Values.wso2.apk.dp.enabled .Values.wso2.apk.cp.enabled }}
{{- if .Values.wso2.apk.dp.enabled }}
apiVersion: v1
kind: ConfigMap
metadata:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# specific language governing permissions and limitations
# under the License.

{{ if or .Values.wso2.apk.dp.enabled .Values.wso2.apk.cp.enabled }}
{{- if .Values.wso2.apk.dp.enabled }}
apiVersion: v1
kind: Service
metadata:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
{{- if or .Values.wso2.apk.dp.enabled .Values.wso2.apk.cp.enabled }}

# Copyright (c) 2023, WSO2 LLC. (https://www.wso2.com) All Rights Reserved.
#
# WSO2 LLC. licenses this file to you under the Apache License,
Expand All @@ -15,7 +13,7 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

{{- if .Values.wso2.apk.dp.enabled }}
apiVersion: v1
data:
auth_key.txt: MmpybXlwYWszOTF6c3F6OTc0dWdkZGRlYmY4MTJvZngxYjl0MW9xMjc1MzBpcjAydGM4MTVlZW1yeDQzNXF2Y3A0MXVjZ3k3djV1dWF3emk0cWNtanJ4MGsxemdveDJzMjhjcg==
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# specific language governing permissions and limitations
# under the License.

{{ if or .Values.wso2.apk.dp.enabled .Values.wso2.apk.cp.enabled }}
{{- if .Values.wso2.apk.dp.enabled }}
apiVersion: v1
kind: Service
metadata:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if or .Values.wso2.apk.dp.enabled .Values.wso2.apk.cp.enabled }}
{{- if .Values.wso2.apk.dp.enabled }}
apiVersion: v1
kind: ConfigMap
metadata:
Expand Down Expand Up @@ -29,15 +29,15 @@ data:
[commoncontroller.truststore]
location = "/home/wso2/security/truststore"

{{- if .Values.wso2.apk.dp.commonController.deployment.controlplane }}
{{- if .Values.wso2.apk.cp }}
[commoncontroller.controlplane]
enabled = {{ .Values.wso2.apk.dp.commonController.deployment.controlplane.enabled | default false }}
host = "{{ .Values.wso2.apk.dp.commonController.deployment.controlplane.host | default "apim-apk-agent-service.apk.svc.cluster.local" }}"
eventPort = {{ .Values.wso2.apk.dp.commonController.deployment.controlplane.port | default 18000 }}
skipSSLVerification = {{ .Values.wso2.apk.dp.commonController.deployment.controlplane.skipSSLVerification | default false }}
{{- if .Values.wso2.apk.dp.commonController.deployment.controlplane.persistence }}
enabled = {{ .Values.wso2.apk.cp.enabledSubscription | default false }}
host = "{{ .Values.wso2.apk.cp.host | default "apim-apk-agent-service.apk.svc.cluster.local" }}"
eventPort = 18000
skipSSLVerification = {{ .Values.wso2.apk.cp.skipSSLVerification | default false }}
{{- if and .Values.wso2.apk.cp .Values.wso2.apk.cp.persistence }}
[commoncontroller.controlplane.persistence]
type = "{{ .Values.wso2.apk.dp.commonController.deployment.controlplane.persistence.type | default "K8s" }}"
type = "{{ .Values.wso2.apk.cp.persistence.type | default "K8s" }}"
{{- end }}
{{- end }}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{ if or .Values.wso2.apk.dp.enabled .Values.wso2.apk.cp.enabled }}
{{- if .Values.wso2.apk.dp.enabled }}
kind: TokenIssuer
apiVersion: dp.wso2.com/v1alpha1
metadata:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
# -----------------------------------------------------------------------
{{ if or .Values.wso2.apk.dp.enabled .Values.wso2.apk.cp.enabled }}
{{- if .Values.wso2.apk.dp.enabled }}

apiVersion: v1
kind: ConfigMap
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{ if or .Values.wso2.apk.dp.enabled .Values.wso2.apk.cp.enabled }}
{{- if .Values.wso2.apk.dp.enabled }}
apiVersion: v1
kind: Secret
metadata:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{ if or .Values.wso2.apk.dp.enabled .Values.wso2.apk.cp.enabled }}
{{- if .Values.wso2.apk.dp.enabled }}
apiVersion: v1
kind: Secret
metadata:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# limitations under the License.
# -----------------------------------------------------------------------

{{ if or .Values.wso2.apk.dp.enabled .Values.wso2.apk.cp.enabled}}
{{- if .Values.wso2.apk.dp.enabled }}
{{- if and .Values.wso2.apk.dp.gateway.autoscaling .Values.wso2.apk.dp.gateway.autoscaling.enabled -}}

apiVersion: autoscaling/v2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# specific language governing permissions and limitations
# under the License.

{{ if or .Values.wso2.apk.dp.enabled .Values.wso2.apk.cp.enabled }}
{{- if .Values.wso2.apk.dp.enabled }}
apiVersion: apps/v1
kind: Deployment
metadata:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# specific language governing permissions and limitations
# under the License.

{{ if or .Values.wso2.apk.dp.enabled .Values.wso2.apk.cp.enabled }}
{{- if .Values.wso2.apk.dp.enabled }}
apiVersion: v1
kind: Service
metadata:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{ if or .Values.wso2.apk.dp.enabled .Values.wso2.apk.cp.enabled }}
{{- if .Values.wso2.apk.dp.enabled }}
kind: TokenIssuer
apiVersion: dp.wso2.com/v1alpha1
metadata:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if or .Values.wso2.apk.dp.enabled .Values.wso2.apk.cp.enabled }}
{{- if .Values.wso2.apk.dp.enabled }}
apiVersion: v1
kind: ConfigMap
metadata:
Expand All @@ -21,13 +21,13 @@ data:
port = 18006
{{ end}}

{{- if and .Values.wso2.apk.cp .Values.wso2.apk.cp.controlplane }}
{{- if .Values.wso2.apk.cp }}
[adapter.controlplane]
enableAPIPropagation = {{ .Values.wso2.apk.cp.controlplane.enableApiPropagation | default false }}
host = "{{ .Values.wso2.apk.cp.controlplane.host | default "apim-apk-agent-service.apk.svc.cluster.local" }}"
eventPort = {{ .Values.wso2.apk.cp.controlplane.port | default 18000 }}
restPort = {{ .Values.wso2.apk.cp.controlplane.restPort | default 18001 }}
skipSSLVerification = {{ .Values.wso2.apk.cp.controlplane.skipSSLVerification | default false }}
enableAPIPropagation = {{ .Values.wso2.apk.cp.enableApiPropagation | default false }}
host = "{{ .Values.wso2.apk.cp.host | default "apim-apk-agent-service.apk.svc.cluster.local" }}"
eventPort = 18000
restPort = 18001
skipSSLVerification = {{ .Values.wso2.apk.cp.skipSSLVerification | default false }}
{{- end }}

{{ if and .Values.wso2.apk.dp.gatewayRuntime.deployment .Values.wso2.apk.dp.gatewayRuntime.deployment.router .Values.wso2.apk.dp.gatewayRuntime.deployment.router.configs }}
Expand Down
11 changes: 7 additions & 4 deletions helm-charts/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,13 @@ wso2:
# jwksEndpoint: "https://idp.am.wso2.com:9095/oauth2/jwks"
# secretName: "wso2apk-idp-signing"
# fileName: "idp.crt"
# cp:
# enableApiPropagation: false
# enabledSubscription: false
# host: "apim-apk-agent-service.apk.svc.cluster.local"
# skipSSLVerification: false
# persistence:
# type: "K8s"
dp:
enabled: true
gateway:
Expand Down Expand Up @@ -148,10 +155,6 @@ wso2:
image: wso2/apk-common-controller:1.1.0-beta
security:
sslHostname: "commoncontroller"
# controlplane:
# enabled: true
# host: "apim-apk-agent-service.apk.svc.cluster.local"
# skipSSLVerification: true
# configs:
# apiNamespaces:
# - "apk-v12"
Expand Down
Loading
Loading