jedcunningham commented on code in PR #39936:
URL: https://github.com/apache/airflow/pull/39936#discussion_r1627985449
##########
chart/values.schema.json:
##########
@@ -7409,6 +7409,14 @@
],
"default": null
},
+ "gitSshKey": {
Review Comment:
```suggestion
"sshKey": {
```
I think maybe `sshKey` is a better name for this?
##########
helm_tests/other/test_git_sync_scheduler.py:
##########
@@ -211,6 +211,45 @@ def test_validate_if_ssh_params_are_added(self):
"secret": {"secretName": "ssh-secret", "defaultMode": 288},
} in jmespath.search("spec.template.spec.volumes", docs[0])
+ def test_validate_if_ssh_params_are_added_with_git_ssh_key(self):
+ docs = render_chart(
+ values={
+ "dags": {
+ "gitSync": {
+ "enabled": True,
+ "containerName": "git-sync-test",
+ "gitSshKey": "dummy-ssh-key",
+ "knownHosts": None,
+ "branch": "test-branch",
Review Comment:
We should either remove this or test it was set properly.
##########
chart/templates/secrets/git-ssh-key-secret.yaml:
##########
@@ -0,0 +1,34 @@
+{{/*
+ 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 and .Values.dags.gitSync.gitSshKey .Values.dags.gitSync.enabled}}
+apiVersion: v1
+kind: Secret
+metadata:
+ labels:
+ release: {{ .Release.Name }}
+ chart: {{ .Chart.Name }}
+ heritage: {{ .Release.Service }}
+ {{- with .Values.labels }}
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
+ name: airflow-ssh-secret
+data:
+ gitSshKey: {{ .Values.dags.gitSync.gitSshKey | quote }}
Review Comment:
This is still expecting a b64 string?
##########
helm_tests/other/test_git_sync_scheduler.py:
##########
@@ -211,6 +211,45 @@ def test_validate_if_ssh_params_are_added(self):
"secret": {"secretName": "ssh-secret", "defaultMode": 288},
} in jmespath.search("spec.template.spec.volumes", docs[0])
+ def test_validate_if_ssh_params_are_added_with_git_ssh_key(self):
+ docs = render_chart(
+ values={
+ "dags": {
+ "gitSync": {
+ "enabled": True,
+ "containerName": "git-sync-test",
+ "gitSshKey": "dummy-ssh-key",
+ "knownHosts": None,
Review Comment:
Let's either have a dummy value or remove this one.
##########
helm_tests/other/test_git_sync_scheduler.py:
##########
@@ -211,6 +211,45 @@ def test_validate_if_ssh_params_are_added(self):
"secret": {"secretName": "ssh-secret", "defaultMode": 288},
} in jmespath.search("spec.template.spec.volumes", docs[0])
+ def test_validate_if_ssh_params_are_added_with_git_ssh_key(self):
+ docs = render_chart(
+ values={
+ "dags": {
+ "gitSync": {
+ "enabled": True,
+ "containerName": "git-sync-test",
Review Comment:
```suggestion
```
Don't think we need to set this.
--
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]