dnskr commented on code in PR #5633:
URL: https://github.com/apache/kyuubi/pull/5633#discussion_r1388665762
##########
charts/kyuubi/templates/kyuubi-etcd-secret.yaml:
##########
@@ -0,0 +1,32 @@
+{{/*
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/}}
+
+{{- if .Values.ha.etcd.ssl.enabled }}
+{{- $ca := .Files.Get .Values.ha.etcd.ssl.ca.path | b64enc | quote }}
+{{- $client_certificate := .Files.Get
.Values.ha.etcd.ssl.client.certificate.path | b64enc | quote }}
+{{- $client_key := .Files.Get .Values.ha.etcd.ssl.client.key.path | b64enc |
quote }}
Review Comment:
Am I right that the implementation assumes the following?
- User downloads the chart to local filesystem.
- User puts sensitive files to the chart directory on the filesystem.
- User changes `.Values.ha.etcd.ssl.ca.path`,
`.Values.ha.etcd.ssl.client.certificate.path` and
`.Values.ha.etcd.ssl.client.key.path` values to point them to the files.
- User executes helm install <local-chart-directory>/kyuubi.
If so, the approach won't work in the following two cases:
1. [Default] If user executes `helm install
<kyuubi-chart-repo>/<kyuubi-chart>` as @pan3793 mentioned
2. [GitOps] If user uses AgroCD or similar CI/CD tool.
Moreover, I would prefer to not create Secrets in the chart at all or at
least I would not recommend it for production deployments.
I would suggest to create the `Secret` from outside the chart release flow
(manually or using secret management tools) and refer to it. I.e. I propose the
following structure in `values.yaml` file with expected Secret example
```yaml
ha:
etcd:
ssl:
enabled: false
# apiVersion: v1
# kind: Secret
# metadata:
# name: kyuubi-ha-etcd-ssl
# data:
# ca.crt: <base64 encoded ca.crt file content>
# client.crt: <base64 encoded client.crt file content>
# client_key.pem: <base64 encoded client_key.pem file content>
secretName: kyuubi-ha-etcd-ssl
mountPath: /etc/kyuubi/ssl
```
_(not sure `/etc/kyuubi/ssl` is the best path for those files)_
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]