Skip to content

Commit

Permalink
replace param images with containerImages
Browse files Browse the repository at this point in the history
  • Loading branch information
splattner committed Apr 26, 2024
1 parent eca3886 commit d54ede8
Show file tree
Hide file tree
Showing 12 changed files with 44 additions and 44 deletions.
2 changes: 1 addition & 1 deletion config/_default/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ distroName = "Kubernetes"
cliToolName = "kubectl"
customer = "none"

[params.images]
[params.containerImages]
deployment-image-url = "quay.io/acend/example-web-go:latest"
training-image-url = "quay.io/acend/example-web-python:latest"
training-image-port = "5000"
Expand Down
2 changes: 1 addition & 1 deletion config/baloise/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ cliToolName = "oc"
automaticSectionNumbers = true
customer = "baloise"

[params.images]
[params.containerImages]
deployment-image-url = "REGISTRY-URL/acend/example-web-go:latest"
training-image-url = "REGISTRY-URL/acend/example-web-python:latest"
training-image-port = "5000"
Expand Down
2 changes: 1 addition & 1 deletion config/bfh/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ enabledModule = "base openshift bfh nodaemonsets nodeploymentstrategies nohelm n
distroName = "OpenShift"
cliToolName = "oc"

[params.images]
[params.containerImages]
training-image-url = "quay.io/acend/example-web-python:bfh"
2 changes: 1 addition & 1 deletion config/sbb/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ distroName = "OpenShift"
cliToolName = "oc"
automaticSectionNumbers = true

[params.images]
[params.containerImages]
training-image-url = "quay.io/appuio/example-spring-boot:latest"
training-image-port = "8080"
training-image-probe-port = "9000"
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Edit your existing `example-web-app` Deployment by changing your local `deployme
spec:
initContainers:
- name: wait-for-db
image: {{% param "images.busybox" %}}
image: {{% param "containerImages.busybox" %}}
command:
[
"sh",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ metadata:
spec:
containers:
- name: lr-demo-ctr
image: {{% param "images.nginxinc-nginx-unprivileged" %}}:latest
image: {{% param "containerImages.nginxinc-nginx-unprivileged" %}}:latest
resources:
limits:
memory: "200Mi"
Expand Down Expand Up @@ -200,7 +200,7 @@ spec:
- 85M
- --vm-hang
- "1"
image: {{% param "images.stress" %}}
image: {{% param "containerImages.stress" %}}
imagePullPolicy: Always
name: stress
```
Expand Down Expand Up @@ -244,7 +244,7 @@ Near the end of the output you can find the relevant status part:
```yaml
containerStatuses:
- containerID: docker://da2473f1c8ccdffbb824d03689e9fe738ed689853e9c2643c37f206d10f93a73
image: {{% param "images.stress" %}}
image: {{% param "containerImages.stress" %}}
lastState:
terminated:
...
Expand Down Expand Up @@ -299,7 +299,7 @@ spec:
- 85M
- --vm-hang
- "1"
image: {{% param "images.stress" %}}
image: {{% param "containerImages.stress" %}}
imagePullPolicy: Always
name: stress
resources:
Expand Down Expand Up @@ -350,7 +350,7 @@ spec:
- 10M
- --vm-hang
- "1"
image: {{% param "images.stress" %}}
image: {{% param "containerImages.stress" %}}
imagePullPolicy: Always
name: overbooked
```
Expand Down Expand Up @@ -406,7 +406,7 @@ spec:
- 10M
- --vm-hang
- "1"
image: {{% param "images.stress" %}}
image: {{% param "containerImages.stress" %}}
imagePullPolicy: Always
name: overbooked
resources:
Expand Down
2 changes: 1 addition & 1 deletion content/en/docs/additional-concepts/statefulsets/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ Set the StatefulSet's image tag to `latest`:


```bash
{{% param cliToolName %}} set image statefulset nginx-cluster nginx={{% param "images.nginxinc-nginx-unprivileged" %}}:latest --namespace <namespace>
{{% param cliToolName %}} set image statefulset nginx-cluster nginx={{% param "containerImages.nginxinc-nginx-unprivileged" %}}:latest --namespace <namespace>
```


Expand Down
4 changes: 2 additions & 2 deletions content/en/docs/attaching-a-database/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ Your file should now look like this:
```
...
containers:
- image: {{% param "images.training-image-url" %}}
- image: {{% param "containerImages.training-image-url" %}}
imagePullPolicy: Always
name: example-web-app
...
Expand Down Expand Up @@ -386,7 +386,7 @@ Add the environment variables by directly editing the Deployment:
```yaml
...
containers:
- image: {{% param "images.training-image-url" %}}
- image: {{% param "containerImages.training-image-url" %}}
imagePullPolicy: Always
name: example-web-app
...
Expand Down
6 changes: 3 additions & 3 deletions content/en/docs/deploying-a-container-image/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ metadata:
name: awesome-app
spec:
containers:
- image: {{% param "images.deployment-image-url" %}}
- image: {{% param "containerImages.deployment-image-url" %}}
imagePullPolicy: Always
name: awesome-app
resources:
Expand Down Expand Up @@ -118,7 +118,7 @@ spec:
app: example-web-go
spec:
containers:
- image: {{% param "images.deployment-image-url" %}}
- image: {{% param "containerImages.deployment-image-url" %}}
name: example-web-go
resources:
requests:
Expand Down Expand Up @@ -189,7 +189,7 @@ However, the result is the same. The helper commands just simplify the process o
As an example, let's look at creating above deployment, this time using a helper command instead. If you already created the Deployment using above YAML definition, you don't have to execute this command:

```yaml
{{% param cliToolName %}} create deployment example-web-go --image={{% param "images.deployment-image-url" %}} --namespace <namespace>
{{% param cliToolName %}} create deployment example-web-go --image={{% param "containerImages.deployment-image-url" %}} --namespace <namespace>
```

It's important to know that these helper commands exist.
Expand Down
4 changes: 2 additions & 2 deletions content/en/docs/helm/simplechart.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ You will now find a `mychart` directory with the newly created chart. It already
{{% onlyWhen openshift %}}
The default image freshly created chart deploys is a simple nginx image listening on port `80`.

Since OpenShift doesn't allow to run containers as root by default, we need to change the default image to an unprivileged one (`{{% param "images.nginxinc-nginx-unprivileged" %}}`) and also change the containerPort to `8080`.
Since OpenShift doesn't allow to run containers as root by default, we need to change the default image to an unprivileged one (`{{% param "containerImages.nginxinc-nginx-unprivileged" %}}`) and also change the containerPort to `8080`.

Change the image in the `mychart/values.yaml`

```yaml
...
image:
repository: {{% param "images.nginxinc-nginx-unprivileged" %}}
repository: {{% param "containerImages.nginxinc-nginx-unprivileged" %}}
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
tag: "latest"
Expand Down
28 changes: 14 additions & 14 deletions content/en/docs/scaling/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ spec:
app: example-web-app
spec:
containers:
- image: {{% param "images.training-image-url" %}}
- image: {{% param "containerImages.training-image-url" %}}
name: example-web-app
resources:
limits:
Expand Down Expand Up @@ -176,7 +176,7 @@ Now we expose our application to the internet by creating a service and a route.
First the Service:

```bash
oc expose deployment example-web-app --name="example-web-app" --port={{% param "images.training-image-port" %}} --namespace <namespace>
oc expose deployment example-web-app --name="example-web-app" --port={{% param "containerImages.training-image-port" %}} --namespace <namespace>
```

Then the Route:
Expand Down Expand Up @@ -214,9 +214,9 @@ Annotations: <none>
Selector: app=example-web-app
Type: ClusterIP
IP: 10.39.245.205
Port: <unset> {{% param "images.training-image-port" %}}/TCP
TargetPort: {{% param "images.training-image-port" %}}/TCP
Endpoints: 10.36.0.10:{{% param "images.training-image-port" %}},10.36.0.11:{{% param "images.training-image-port" %}},10.36.0.9:{{% param "images.training-image-port" %}}
Port: <unset> {{% param "containerImages.training-image-port" %}}/TCP
TargetPort: {{% param "containerImages.training-image-port" %}}/TCP
Endpoints: 10.36.0.10:{{% param "containerImages.training-image-port" %}},10.36.0.11:{{% param "containerImages.training-image-port" %}},10.36.0.9:{{% param "containerImages.training-image-port" %}}
Session Affinity: None
External Traffic Policy: Cluster
Events:
Expand All @@ -238,9 +238,9 @@ IP Family Policy: SingleStack
IP Families: IPv4
IP: 172.30.89.44
IPs: 172.30.89.44
Port: <unset> {{% param "images.training-image-port" %}}/TCP
TargetPort: {{% param "images.training-image-port" %}}/TCP
Endpoints: 10.125.4.70:{{% param "images.training-image-port" %}},10.126.4.137:{{% param "images.training-image-port" %}},10.126.4.138:{{% param "images.training-image-port" %}}
Port: <unset> {{% param "containerImages.training-image-port" %}}/TCP
TargetPort: {{% param "containerImages.training-image-port" %}}/TCP
Endpoints: 10.125.4.70:{{% param "containerImages.training-image-port" %}},10.126.4.137:{{% param "containerImages.training-image-port" %}},10.126.4.138:{{% param "containerImages.training-image-port" %}}
Session Affinity: None
Events: <none>
```
Expand Down Expand Up @@ -417,7 +417,7 @@ In our example, we want the application to tell {{% param distroName %}} that it
Our example application has a health check context named health: `{{% onlyWhenNot openshift %}}http://<node-ip>:<node-port>/health{{% /onlyWhenNot %}}{{% onlyWhen openshift %}}http://${URL}/health{{% /onlyWhen %}}`
{{% /onlyWhenNot %}}
{{% onlyWhen sbb %}}
Our example application has a health check context named health: `http://localhost:{{% param "images.training-image-probe-port" %}}/health`. This port is not exposed by a service. It is only accessible inside the cluster.
Our example application has a health check context named health: `http://localhost:{{% param "containerImages.training-image-probe-port" %}}/health`. This port is not exposed by a service. It is only accessible inside the cluster.
{{% /onlyWhen %}}


Expand All @@ -432,14 +432,14 @@ Now insert the readiness probe at `.spec.template.spec.containers` above the `re

...
containers:
- image: {{% param "images.training-image-url" %}}
- image: {{% param "containerImages.training-image-url" %}}
imagePullPolicy: Always
name: example-web-app
# start to copy here
readinessProbe:
httpGet:
path: /health
port: {{% param "images.training-image-probe-port" %}}
port: {{% param "containerImages.training-image-probe-port" %}}
scheme: HTTP
initialDelaySeconds: 10
timeoutSeconds: 1
Expand All @@ -465,7 +465,7 @@ apply the file with:
Define the readiness probe on the Deployment using the following command:

```bash
oc set probe deploy/example-web-app --readiness --get-url=http://:{{% param "images.training-image-probe-port" %}}/health --initial-delay-seconds=10 --timeout-seconds=1 --namespace <namespace>
oc set probe deploy/example-web-app --readiness --get-url=http://:{{% param "containerImages.training-image-probe-port" %}}/health --initial-delay-seconds=10 --timeout-seconds=1 --namespace <namespace>
```

The command above results in the following `readinessProbe` snippet being inserted into the Deployment:
Expand All @@ -474,13 +474,13 @@ The command above results in the following `readinessProbe` snippet being insert

...
containers:
- image: {{% param "images.training-image-url" %}}
- image: {{% param "containerImages.training-image-url" %}}
imagePullPolicy: Always
name: example-web-app
readinessProbe:
httpGet:
path: /health
port: {{% param "images.training-image-probe-port" %}}
port: {{% param "containerImages.training-image-probe-port" %}}
scheme: HTTP
initialDelaySeconds: 10
timeoutSeconds: 1
Expand Down
Loading

0 comments on commit d54ede8

Please sign in to comment.