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

Add config options to streamline with k8s standards #71

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
7 changes: 6 additions & 1 deletion kubernetes/blackduck/templates/serviceaccount.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,10 @@ metadata:
labels:
{{- include "bd.labelsWithoutVersion" . | nindent 4 }}
component: serviceaccount

{{- if .Values.serviceaccount.annotations }}
annotations:
{{ .Values.serviceaccount.annotations | toYaml}}
{{- end }}
name: {{ .Release.Name }}-blackduck-service-account
namespace: {{ .Release.Namespace }}
namespace: {{ .Release.Namespace }}
21 changes: 18 additions & 3 deletions kubernetes/blackduck/templates/webserver.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ metadata:
component: webserver
name: {{ .Release.Name }}-blackduck-webserver
namespace: {{ .Release.Namespace }}
{{- if .Values.webserver.serviceAnnotations }}
annotations:
{{ .Values.webserver.serviceAnnotations | toYaml}}
{{- end }}
spec:
ports:
- name: port-443
Expand All @@ -27,6 +31,10 @@ metadata:
component: route
name: {{ .Release.Name }}-blackduck
namespace: {{ .Release.Namespace }}
{{- if .Values.webserver.exposedServiceAnnotations }}
annotations:
{{ .Values.webserver.exposedServiceAnnotations | toYaml}}
{{- end }}
spec:
host: ""
port:
Expand All @@ -51,6 +59,10 @@ metadata:
component: webserver-exposed
name: {{ .Release.Name }}-blackduck-webserver-exposed
namespace: {{ .Release.Namespace }}
{{- if .Values.webserver.exposedServiceAnnotations }}
annotations:
{{ .Values.webserver.exposedServiceAnnotations | toYaml}}
{{- end }}
spec:
ports:
- name: port-443
Expand Down Expand Up @@ -95,6 +107,9 @@ spec:
annotations:
checksum/blackduck-config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
checksum/postgres-config: {{ include (print $.Template.BasePath "/postgres-config.yaml") . | sha256sum }}
{{- if .Values.webserver.deploymentAnnotations }}
{{ .Values.webserver.deploymentAnnotations | toYaml }}
{{- end }}
name: {{ .Release.Name }}-blackduck-webserver
spec:
{{- if .Values.enableInitContainer }}
Expand Down Expand Up @@ -176,13 +191,13 @@ spec:
volumeMounts:
- mountPath: /opt/blackduck/hub/webserver/security
name: dir-webserver
{{- with .Values.tlsCertSecretName }}
{{- if .Values.tlsCertSecretName }}
- mountPath: /tmp/secrets/WEBSERVER_CUSTOM_CERT_FILE
name: certificate
subPath: WEBSERVER_CUSTOM_CERT_FILE
subPath: {{ .Values.tlsCertName | default "WEBSERVER_CUSTOM_CERT_FILE" | quote }}
- mountPath: /tmp/secrets/WEBSERVER_CUSTOM_KEY_FILE
name: certificate
subPath: WEBSERVER_CUSTOM_KEY_FILE
subPath: {{ .Values.tlsKeyName | default "WEBSERVER_CUSTOM_KEY_FILE" | quote }}
{{- end }}
{{- with .Values.certAuthCACertSecretName }}
- mountPath: /tmp/secrets/AUTH_CUSTOM_CA
Expand Down
19 changes: 19 additions & 0 deletions kubernetes/blackduck/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,18 @@ enableIPV6: true
# create a generic secret using the following command
# kubectl create secret generic -n <namespace> <name>-blackduck-webserver-certificate --from-file=WEBSERVER_CUSTOM_CERT_FILE=tls.crt --from-file=WEBSERVER_CUSTOM_KEY_FILE=tls.key
# tlsCertSecretName: <name>-blackduck-webserver-certificate
#
# For secrets generated by other tooling, e.g. cert-manager it might be necessary
# to change the field names in the tls secret
# The name of the tls field for the certificate
# defaults to WEBSERVER_CUSTOM_CERT_FILE
# tlsCertName
#
# The name of the tls field for the key
# defaults to WEBSERVER_CUSTOM_KEY_FILE
# tlsKeyName
#
#

# Certificate Authentication Custom CA certificate for Black Duck (Not Mandatory)
# create a generic secret using the following command
Expand Down Expand Up @@ -399,10 +411,17 @@ webserver:
podSecurityContext: {}
securityContext: {}
resources: {}
serviceAnnotations: {}
exposedServiceAnnotations: {}
deploymentAnnotations: {}

datadog:
enabled: false
# override the docker registry at container level
registry:
imageTag: "1.0.1"
imagePullPolicy: IfNotPresent


serviceaccount:
annotations: {}