Skip to content

Commit 2df9fbc

Browse files
committed
Add support for specifying the hostname when using OpenShift.
1 parent e66aabb commit 2df9fbc

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

kubernetes/blackduck/README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,11 @@ You can access the Black Duck UI by https://${EXTERNAL_IP}
128128

129129
```bash
130130
$ export SERVICE_TYPE=OpenShift
131-
$ helm upgrade ${BD_NAME} synopsys/blackduck --namespace ${BD_NAME} --set exposedServiceType=${SERVICE_TYPE} --reuse-values
131+
$ export HOST_NAME=blackduck.example.com
132+
$ helm upgrade ${BD_NAME} synopsys/blackduck --namespace ${BD_NAME} \
133+
--set exposedServiceType=${SERVICE_TYPE} \
134+
--set route.hostname=${HOST_NAME} \
135+
--reuse-values
132136
```
133137

134138
you can use the following command to get the OpenShift routes

kubernetes/blackduck/templates/webserver.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ metadata:
2828
name: {{ .Release.Name }}-blackduck
2929
namespace: {{ .Release.Namespace }}
3030
spec:
31-
host: ""
31+
host: "{{ .Values.route.hostname }}"
3232
port:
3333
targetPort: port-443
3434
tls:

kubernetes/blackduck/values.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ exposedServiceType: NodePort
2727
# custom port to expose the NodePort service on
2828
exposedNodePort: ""
2929

30+
# The hostname for the OpenShift route. An empty hostname lets OpenShift autogenerate the hostname.
31+
route:
32+
hostname: ""
33+
3034
# enable Persistent Storage for containers
3135
enablePersistentStorage: true
3236
# it will apply to all PVC's storage class but it can be override at co# ntainer level

0 commit comments

Comments
 (0)