Skip to content

Commit 0b3338c

Browse files
Merge pull request #44509 from michaelryanpeter/OSDOCS-3509-osdk-bug-helm-restricted-proc
OSDOCS-3509: OSDK bug fix for Helm restricted env procedure
2 parents 1a5eb07 + 35ac959 commit 0b3338c

File tree

1 file changed

+40
-10
lines changed

1 file changed

+40
-10
lines changed

modules/olm-enabling-operator-restricted-network.adoc

Lines changed: 40 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -108,23 +108,53 @@ spec:
108108
<.> Use the `lookup` function to call the `<related_image_environment_variable>`.
109109
====
110110
111-
* For Helm-based Operator projects, add the environment variable to the `helm-charts/memchached/values.yaml` file as shown in the following example:
111+
* For Helm-based Operator projects, add the `overrideValues` field to the `watches.yaml` file as shown in the following example:
112112
+
113-
.`helm-charts/memchached/values.yaml` diff
113+
.Example `watches.yaml` file
114114
[%collapsible]
115115
====
116-
[source,diff]
116+
[source,yaml]
117117
----
118-
## Memcached image and tag
119-
## ref: https://hub.docker.com/r/library/memcached/tags/
120-
##
121-
- image: memcached:1.5.20 <.>
122-
+ image: "{{ lookup('env', '<related_image_environment_variable>') }}" <.>
118+
...
119+
- group: demo.example.com
120+
version: v1alpha1
121+
kind: Memcached
122+
chart: helm-charts/memcached
123+
overrideValues: <.>
124+
relatedImage: ${<related_image_environment_variable>} <.>
125+
----
126+
<.> Add the `overrideValues` field.
127+
<.> Define the `overrideValues` field by using the `<related_image_environment_variable>`, such as `RELATED_IMAGE_MEMCACHED`.
128+
====
123129
130+
.. Add the value of the `overrideValues` field to the `helm-charts/memchached/values.yaml` file as shown in the following example:
131+
+
132+
.Example `helm-charts/memchached/values.yaml` file
133+
[source,yaml]
134+
----
124135
...
136+
relatedImage: ""
125137
----
126-
<.> Delete the image reference and tag.
127-
<.> Use the `lookup` function to call the `<related_image_environment_variable>`.
138+
139+
.. Edit the chart template in the `helm-charts/memcached/templates/deployment.yaml` file as shown in the following example:
140+
+
141+
.Example `helm-charts/memcached/templates/deployment.yaml` file
142+
[%collapsible]
143+
====
144+
[source,yaml]
145+
----
146+
containers:
147+
- name: {{ .Chart.Name }}
148+
securityContext:
149+
- toYaml {{ .Values.securityContext | nindent 12 }}
150+
image: "{{ .Values.image.pullPolicy }}
151+
env: <.>
152+
- name: related_image <.>
153+
value: "{{ .Values.relatedImage }}" <.>
154+
----
155+
<.> Add the `env` field.
156+
<.> Name the environment variable.
157+
<.> Define the value of the environment variable.
128158
====
129159
130160
. Add the `BUNDLE_GEN_FLAGS` variable definition to your `Makefile` with the following changes:

0 commit comments

Comments
 (0)