Skip to content

Commit de342de

Browse files
committed
Deployment references updated to reflect current style (Squash)
1 parent 590da8d commit de342de

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

modules/ossm-automatic-sidecar-injection.adoc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
[id="ossm-automatic-sidecar-injection_{context}"]
88
= Enabling automatic sidecar injection
99

10-
When deploying an application, you must opt-in to injection by configuring the label `sidecar.istio.io/inject` in `spec.template.metadata.annotations` to `true` in the `deployment` object. Opting in ensures that the sidecar injection does not interfere with other {product-title} features such as builder pods used by numerous frameworks within the {product-title} ecosystem.
10+
When deploying an application, you must opt-in to injection by configuring the label `sidecar.istio.io/inject` in `spec.template.metadata.labels` to `true` in the `deployment` object. Opting in ensures that the sidecar injection does not interfere with other {product-title} features such as builder pods used by numerous frameworks within the {product-title} ecosystem.
1111

1212
.Prerequisites
1313

@@ -22,16 +22,16 @@ When deploying an application, you must opt-in to injection by configuring the l
2222
$ oc get deployment -n <namespace>
2323
----
2424
+
25-
For example, to view the deployment file for the 'ratings-v1' microservice in the `bookinfo` namespace, use the following command to see the resource in YAML format.
25+
For example, to view the Deployment YAML file for the 'ratings-v1' microservice in the `bookinfo` namespace, use the following command to see the resource in YAML format.
2626
+
2727
[source,terminal]
2828
----
2929
oc get deployment -n bookinfo ratings-v1 -o yaml
3030
----
3131
+
32-
. Open the application's deployment configuration YAML file in an editor.
32+
. Open the application's Deployment YAML file in an editor.
3333
// 04/24/2024: spec.template.metadata might need to say metadata.labels. instead of metadata.annotations, pending confirmation from dev
34-
. Add `spec.template.metadata.annotations.sidecar.istio/inject` to your Deployment YAML and set `sidecar.istio.io/inject` to `true` as shown in the following example.
34+
. Add `spec.template.metadata.labels.sidecar.istio/inject` to your Deployment YAML file and set `sidecar.istio.io/inject` to `true` as shown in the following example.
3535
+
3636
.Example snippet from bookinfo deployment-ratings-v1.yaml
3737
[source,yaml]
@@ -47,7 +47,7 @@ metadata:
4747
spec:
4848
template:
4949
metadata:
50-
label:
50+
labels:
5151
sidecar.istio.io/inject: 'true'
5252
----
5353
+
@@ -56,7 +56,7 @@ spec:
5656
Use `label` instead of `annotation`.
5757
====
5858
+
59-
. Save the Deployment configuration file.
59+
. Save the Deployment YAML file.
6060

6161
. Add the file back to the project that contains your app.
6262
+

0 commit comments

Comments
 (0)