-
Notifications
You must be signed in to change notification settings - Fork 8
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
chore(helm): enable k8s secrets and custom db user for subchart #34
Changes from 7 commits
d5f6667
d23c3aa
6e65f23
99cd9d1
4d6aa5f
4df1df8
5562c7f
5cce935
7c21e9b
8b56d3b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{{- /* | ||
* Copyright (c) 2024 Contributors to the Eclipse Foundation | ||
* | ||
* See the NOTICE file(s) distributed with this work for additional | ||
* information regarding copyright ownership. | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Apache License, Version 2.0 which is available at | ||
* https://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. | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/}} | ||
|
||
{{- if not .Values.server.endpoints.management.existingSecret }} | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: {{ template "bdrs.secretName" . }} | ||
namespace: {{ .Release.Namespace | quote }} | ||
type: Opaque | ||
data: | ||
auth-key: {{ .Values.server.endpoints.management.authKey | required ".Values.server.endpoints.management.authKey is required" | b64enc | quote }} | ||
{{- end }} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -85,6 +85,8 @@ server: | |
path: /api/management | ||
# -- authentication key, must be attached to each 'X-Api-Key' request header | ||
authKey: "password" | ||
# -- secret containing the auth-key for incoming api calls | ||
existingSecret: "" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The name |
||
# -- directory API | ||
directory: | ||
# -- port for incoming api calls | ||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -84,3 +84,30 @@ Create the name of the service account to use | |||||
{{- default "default" .Values.serviceAccount.name }} | ||||||
{{- end }} | ||||||
{{- end }} | ||||||
|
||||||
{{/* | ||||||
Determine secret name. | ||||||
*/}} | ||||||
{{- define "bdrs.secretName" -}} | ||||||
{{- if .Values.existingSecret -}} | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. that path seems incorrect - shouldn't it be this?
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. thanks, fixed |
||||||
{{- .Values.existingSecret }} | ||||||
{{- else -}} | ||||||
{{- include "bdrs.fullname" . -}} | ||||||
{{- end -}} | ||||||
{{- end -}} | ||||||
|
||||||
{{/* | ||||||
Define secret name of postgresql dependency. | ||||||
*/}} | ||||||
{{- define "bdrs.postgresqlSecretName" -}} | ||||||
{{- if .Values.postgresql.fullnameOverride -}} | ||||||
{{- .Values.postgresql.fullnameOverride | trunc 63 | trimSuffix "-" -}} | ||||||
{{- else -}} | ||||||
{{- $name := default "postgresql" .Values.postgresql.nameOverride -}} | ||||||
{{- if contains $name .Release.Name -}} | ||||||
{{- .Release.Name | trunc 63 | trimSuffix "-" -}} | ||||||
{{- else -}} | ||||||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} | ||||||
{{- end -}} | ||||||
{{- end -}} | ||||||
{{- end -}} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{{- /* | ||
* Copyright (c) 2024 Contributors to the Eclipse Foundation | ||
* | ||
* See the NOTICE file(s) distributed with this work for additional | ||
* information regarding copyright ownership. | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Apache License, Version 2.0 which is available at | ||
* https://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. | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/}} | ||
|
||
{{- if not .Values.server.endpoints.management.existingSecret }} | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: {{ template "bdrs.secretName" . }} | ||
namespace: {{ .Release.Namespace | quote }} | ||
type: Opaque | ||
data: | ||
auth-key: {{ .Values.server.endpoints.management.authKey | required ".Values.server.endpoints.management.authKey is required" | b64enc | quote }} | ||
{{- end }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that path seems incorrect - shouldn't it be this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, fixed