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

[Hotfix] Fix apache rat check errors #2952

Merged
merged 4 commits into from
Jun 20, 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
21 changes: 19 additions & 2 deletions charts/amoro/templates/amoro-admin-secret.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
{{/*
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.
*/}}

apiVersion: v1
kind: Secret
metadata:
Expand All @@ -7,5 +24,5 @@ metadata:
type: Opaque
data:
# use helm set dashboard username and password
username: {{ .Values.amoroConf.ams.adminUsername | b64enc | quote }}
password: {{ .Values.amoroConf.ams.adminPassword | b64enc | quote }}
AdminUsername: {{ .Values.amoroConf.ams.adminUsername | b64enc | quote }}
AdminPassword: {{ .Values.amoroConf.ams.adminPassword | b64enc | quote }}
4 changes: 0 additions & 4 deletions charts/amoro/templates/amoro-configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,6 @@ data:
type: {{ .Values.amoroConf.database.type }}
jdbc-driver-class: {{ .Values.amoroConf.database.driver | quote }}
url: {{ .Values.amoroConf.database.url }}
{{- if or (eq .Values.amoroConf.database.type "mysql") (eq .Values.amoroConf.database.type "postgres") }}
username: {{ .Values.amoroConf.database.username | quote }}
password: {{ .Values.amoroConf.database.password | quote }}
{{- end }}
connection-pool-max-total: 20
connection-pool-max-idle: 16
connection-pool-max-wait-millis: 1000
Expand Down
4 changes: 2 additions & 2 deletions charts/amoro/templates/amoro-database-secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ metadata:
type: Opaque
data:
# use helm set username
username: {{ .Values.amoroConf.database.username | b64enc | quote }}
DatabaseUsername: {{ .Values.amoroConf.database.username | b64enc | quote }}
# use helm set password
password: {{ .Values.amoroConf.database.password | b64enc | quote }}
DatabasePassword: {{ .Values.amoroConf.database.password | b64enc | quote }}
{{- end }}
8 changes: 4 additions & 4 deletions charts/amoro/templates/amoro-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,23 +55,23 @@ spec: {{/* TODO If Support Replica can be use more than 1 */}}
valueFrom:
secretKeyRef:
name: {{ include "common.names.fullname" . }}
key: username
key: DatabaseUsername
- name: "AMS_DATABASE_PASSWORD"
valueFrom:
secretKeyRef:
name: {{ include "common.names.fullname" . }}
key: password
key: DatabasePassword
{{- end }}
- name: "AMS_ADMIN__USERNAME"
valueFrom:
secretKeyRef:
name: {{ include "common.names.fullname" . }}
key: username
key: AdminUsername
- name: "AMS_ADMIN__PASSWORD"
valueFrom:
secretKeyRef:
name: {{ include "common.names.fullname" . }}
key: password
key: AdminPassword
{{- with .Values.env }}
{{- tpl (toYaml .) $ | nindent 12 }}
{{- end }}
Expand Down
12 changes: 0 additions & 12 deletions charts/amoro/tests/amoro-configmap_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,18 +49,6 @@ tests:
pattern:
|
bind-port: 1260
- it: Amoro configMap should reflect database.username if type is set to mysql
set:
amoroConf:
database:
type: mysql
username: aaa
asserts:
- matchRegex:
path: data["config.yaml"]
pattern:
|
username: "aaa"
- it: Amoro configMap should reflect terminal iceberg params if terminal.backend is set to local
set:
amoroConf:
Expand Down
4 changes: 2 additions & 2 deletions charts/amoro/tests/amoro-database-secret_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ tests:
password: "123"
asserts:
- equal:
path: data.username
path: data.DatabaseUsername
value: "abc"
decodeBase64: true
- it: Amoro database secret should reflect password if database type is set to mysql
Expand All @@ -81,6 +81,6 @@ tests:
password: "123"
asserts:
- equal:
path: data.password
path: data.DatabasePassword
value: "123"
decodeBase64: true
8 changes: 4 additions & 4 deletions charts/amoro/tests/amoro-deployment_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -117,15 +117,15 @@ tests:
valueFrom:
secretKeyRef:
name: test
key: username
key: DatabaseUsername
- contains:
path: spec.template.spec.containers[?(@.name == "amoro-ams")].env
content:
name: "AMS_DATABASE_PASSWORD"
valueFrom:
secretKeyRef:
name: test
key: password
key: DatabasePassword
- it: Amoro Deployment should add env if database type is set to postgres
template: amoro-deployment.yaml
set:
Expand All @@ -141,15 +141,15 @@ tests:
valueFrom:
secretKeyRef:
name: test
key: username
key: DatabaseUsername
- contains:
path: spec.template.spec.containers[?(@.name == "amoro-ams")].env
content:
name: "AMS_DATABASE_PASSWORD"
valueFrom:
secretKeyRef:
name: test
key: password
key: DatabasePassword
- it: Amoro Deployment should add env if set
template: amoro-deployment.yaml
set:
Expand Down
Loading