diff --git a/config/_default/config.toml b/config/_default/config.toml index 79430bd7..4c88f29f 100644 --- a/config/_default/config.toml +++ b/config/_default/config.toml @@ -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" diff --git a/config/baloise/config.toml b/config/baloise/config.toml index 1b58f24a..56dfb27e 100644 --- a/config/baloise/config.toml +++ b/config/baloise/config.toml @@ -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" diff --git a/config/bfh/config.toml b/config/bfh/config.toml index 85fa5901..779dbef7 100644 --- a/config/bfh/config.toml +++ b/config/bfh/config.toml @@ -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" diff --git a/config/sbb/config.toml b/config/sbb/config.toml index c0025adf..44191f2d 100644 --- a/config/sbb/config.toml +++ b/config/sbb/config.toml @@ -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" diff --git a/content/en/docs/additional-concepts/init-containers/_index.md b/content/en/docs/additional-concepts/init-containers/_index.md index fcfb49ef..38e599e0 100644 --- a/content/en/docs/additional-concepts/init-containers/_index.md +++ b/content/en/docs/additional-concepts/init-containers/_index.md @@ -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", diff --git a/content/en/docs/additional-concepts/resourcequotas-and-limitranges/_index.md b/content/en/docs/additional-concepts/resourcequotas-and-limitranges/_index.md index f5437288..6fe2e059 100644 --- a/content/en/docs/additional-concepts/resourcequotas-and-limitranges/_index.md +++ b/content/en/docs/additional-concepts/resourcequotas-and-limitranges/_index.md @@ -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" @@ -200,7 +200,7 @@ spec: - 85M - --vm-hang - "1" - image: {{% param "images.stress" %}} + image: {{% param "containerImages.stress" %}} imagePullPolicy: Always name: stress ``` @@ -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: ... @@ -299,7 +299,7 @@ spec: - 85M - --vm-hang - "1" - image: {{% param "images.stress" %}} + image: {{% param "containerImages.stress" %}} imagePullPolicy: Always name: stress resources: @@ -350,7 +350,7 @@ spec: - 10M - --vm-hang - "1" - image: {{% param "images.stress" %}} + image: {{% param "containerImages.stress" %}} imagePullPolicy: Always name: overbooked ``` @@ -406,7 +406,7 @@ spec: - 10M - --vm-hang - "1" - image: {{% param "images.stress" %}} + image: {{% param "containerImages.stress" %}} imagePullPolicy: Always name: overbooked resources: diff --git a/content/en/docs/additional-concepts/statefulsets/_index.md b/content/en/docs/additional-concepts/statefulsets/_index.md index 8e6e0fec..a1de2904 100644 --- a/content/en/docs/additional-concepts/statefulsets/_index.md +++ b/content/en/docs/additional-concepts/statefulsets/_index.md @@ -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 +{{% param cliToolName %}} set image statefulset nginx-cluster nginx={{% param "containerImages.nginxinc-nginx-unprivileged" %}}:latest --namespace ``` diff --git a/content/en/docs/attaching-a-database/_index.md b/content/en/docs/attaching-a-database/_index.md index 9d792c9e..f9610ea7 100644 --- a/content/en/docs/attaching-a-database/_index.md +++ b/content/en/docs/attaching-a-database/_index.md @@ -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 ... @@ -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 ... diff --git a/content/en/docs/deploying-a-container-image/_index.md b/content/en/docs/deploying-a-container-image/_index.md index 7d2b65bb..abca72d1 100644 --- a/content/en/docs/deploying-a-container-image/_index.md +++ b/content/en/docs/deploying-a-container-image/_index.md @@ -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: @@ -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: @@ -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 +{{% param cliToolName %}} create deployment example-web-go --image={{% param "containerImages.deployment-image-url" %}} --namespace ``` It's important to know that these helper commands exist. diff --git a/content/en/docs/helm/simplechart.md b/content/en/docs/helm/simplechart.md index 1d2c5694..e3817ea8 100644 --- a/content/en/docs/helm/simplechart.md +++ b/content/en/docs/helm/simplechart.md @@ -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" diff --git a/content/en/docs/scaling/_index.md b/content/en/docs/scaling/_index.md index 2824fa52..caf6e6f2 100644 --- a/content/en/docs/scaling/_index.md +++ b/content/en/docs/scaling/_index.md @@ -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: @@ -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 +oc expose deployment example-web-app --name="example-web-app" --port={{% param "containerImages.training-image-port" %}} --namespace ``` Then the Route: @@ -214,9 +214,9 @@ Annotations: Selector: app=example-web-app Type: ClusterIP IP: 10.39.245.205 -Port: {{% 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: {{% 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: @@ -238,9 +238,9 @@ IP Family Policy: SingleStack IP Families: IPv4 IP: 172.30.89.44 IPs: 172.30.89.44 -Port: {{% 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: {{% 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: ``` @@ -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://:/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 %}} @@ -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 @@ -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 +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 ``` The command above results in the following `readinessProbe` snippet being inserted into the Deployment: @@ -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 diff --git a/content/en/docs/troubleshooting/_index.md b/content/en/docs/troubleshooting/_index.md index d4fb4cd1..8a057509 100644 --- a/content/en/docs/troubleshooting/_index.md +++ b/content/en/docs/troubleshooting/_index.md @@ -201,7 +201,7 @@ Forwarding from [::1]:5000 -> 5000 {{% onlyWhen sbb %}} ```bash -{{% param cliToolName %}} port-forward {{% param "images.training-image-probe-port" %}}:{{% param "images.training-image-probe-port" %}} --namespace +{{% param cliToolName %}} port-forward {{% param "containerImages.training-image-probe-port" %}}:{{% param "containerImages.training-image-probe-port" %}} --namespace ``` Don't forget to change the Pod name to your own installation. If configured, you can use auto-completion. @@ -209,8 +209,8 @@ Don't forget to change the Pod name to your own installation. If configured, you The output of the command should look like this: ``` -Forwarding from 127.0.0.1:{{% param "images.training-image-probe-port" %}} -> {{% param "images.training-image-probe-port" %}} -Forwarding from [::1]:{{% param "images.training-image-probe-port" %}} -> {{% param "images.training-image-probe-port" %}} +Forwarding from 127.0.0.1:{{% param "containerImages.training-image-probe-port" %}} -> {{% param "containerImages.training-image-probe-port" %}} +Forwarding from [::1]:{{% param "containerImages.training-image-probe-port" %}} -> {{% param "containerImages.training-image-probe-port" %}} ``` {{% /onlyWhen %}} @@ -228,14 +228,14 @@ curl localhost:5000 {{% /onlyWhenNot %}} {{% onlyWhen sbb %}} -Now the health endpoint is available at: . +Now the health endpoint is available at: . We could not access this endpoint before because it is only exposed inside the cluster. -The application probe endpoint is now available with the following link: . Or try a `curl` command: +The application probe endpoint is now available with the following link: . Or try a `curl` command: ```bash -curl localhost:{{% param "images.training-image-probe-port" %}}/health +curl localhost:{{% param "containerImages.training-image-probe-port" %}}/health ``` {{% /onlyWhen %}} @@ -279,7 +279,7 @@ The following `{{% param cliToolName %}}` subcommands support this flag (non-fin For example, we can use the `--dry-run=client` flag to create a template for our Deployment: ```bash -{{% param cliToolName %}} create deployment example-web-app --image={{% param "images.training-image-url" %}} --namespace acend-test --dry-run=client -o yaml +{{% param cliToolName %}} create deployment example-web-app --image={{% param "containerImages.training-image-url" %}} --namespace acend-test --dry-run=client -o yaml ``` The result is the following YAML output: @@ -306,7 +306,7 @@ spec: app: example-web-app spec: containers: - - image: {{% param "images.training-image-url" %}} + - image: {{% param "containerImages.training-image-url" %}} name: example-web resources: {} status: {} @@ -320,13 +320,13 @@ If you want to see the HTTP requests `{{% param cliToolName %}}` sends to the Ku For example, to see the API request for creating a deployment: ```bash -{{% param cliToolName %}} create deployment test-deployment --image={{% param "images.training-image-url" %}} --namespace --replicas=0 --v=10 +{{% param cliToolName %}} create deployment test-deployment --image={{% param "containerImages.training-image-url" %}} --namespace --replicas=0 --v=10 ``` The resulting output looks like this: ```bash -I1114 15:31:13.605759 85289 request.go:1073] Request Body: {"kind":"Deployment","apiVersion":"apps/v1","metadata":{"name":"test-deployment","namespace":"acend-test","creationTimestamp":null,"labels":{"app":"test-deployment"}},"spec":{"replicas":0,"selector":{"matchLabels":{"app":"test-deployment"}},"template":{"metadata":{"creationTimestamp":null,"labels":{"app":"test-deployment"}},"spec":{"containers":[{"name":"example-web","image":"{{% param "images.training-image-url" %}}","resources":{}}]}},"strategy":{}},"status":{}} +I1114 15:31:13.605759 85289 request.go:1073] Request Body: {"kind":"Deployment","apiVersion":"apps/v1","metadata":{"name":"test-deployment","namespace":"acend-test","creationTimestamp":null,"labels":{"app":"test-deployment"}},"spec":{"replicas":0,"selector":{"matchLabels":{"app":"test-deployment"}},"template":{"metadata":{"creationTimestamp":null,"labels":{"app":"test-deployment"}},"spec":{"containers":[{"name":"example-web","image":"{{% param "containerImages.training-image-url" %}}","resources":{}}]}},"strategy":{}},"status":{}} I1114 15:31:13.605817 85289 round_trippers.go:466] curl -v -XPOST -H "Accept: application/json, */*" -H "Content-Type: application/json" -H "User-Agent: oc/4.11.0 (linux/amd64) kubernetes/262ac9c" -H "Authorization: Bearer " 'https://api.ocp-staging.cloudscale.puzzle.ch:6443/apis/apps/v1/namespaces/acend-test/deployments?fieldManager=kubectl-create&fieldValidation=Ignore' I1114 15:31:13.607320 85289 round_trippers.go:495] HTTP Trace: DNS Lookup for api.ocp-staging.cloudscale.puzzle.ch resolved to [{5.102.150.82 }] I1114 15:31:13.611279 85289 round_trippers.go:510] HTTP Trace: Dial to tcp:5.102.150.82:6443 succeed @@ -340,7 +340,7 @@ I1114 15:31:13.675200 85289 round_trippers.go:580] X-Kubernetes-Pf-Flowsch I1114 15:31:13.675215 85289 round_trippers.go:580] X-Kubernetes-Pf-Prioritylevel-Uid: 47f392da-68d1-4e43-9d77-ff5f7b7ecd2e I1114 15:31:13.675230 85289 round_trippers.go:580] Content-Length: 1739 I1114 15:31:13.675244 85289 round_trippers.go:580] Date: Mon, 14 Nov 2022 14:31:13 GMT -I1114 15:31:13.676116 85289 request.go:1073] Response Body: {"kind":"Deployment","apiVersion":"apps/v1","metadata":{"name":"test-deployment","namespace":"acend-test","uid":"a6985d28-3caa-451f-a648-4c7cde3b51ac","resourceVersion":"2069385577","generation":1,"creationTimestamp":"2022-11-14T14:31:13Z","labels":{"app":"test-deployment"},"managedFields":[{"manager":"kubectl-create","operation":"Update","apiVersion":"apps/v1","time":"2022-11-14T14:31:13Z","fieldsType":"FieldsV1","fieldsV1":{"f:metadata":{"f:labels":{".":{},"f:app":{}}},"f:spec":{"f:progressDeadlineSeconds":{},"f:replicas":{},"f:revisionHistoryLimit":{},"f:selector":{},"f:strategy":{"f:rollingUpdate":{".":{},"f:maxSurge":{},"f:maxUnavailable":{}},"f:type":{}},"f:template":{"f:metadata":{"f:labels":{".":{},"f:app":{}}},"f:spec":{"f:containers":{"k:{\"name\":\"example-web\"}":{".":{},"f:image":{},"f:imagePullPolicy":{},"f:name":{},"f:resources":{},"f:terminationMessagePath":{},"f:terminationMessagePolicy":{}}},"f:dnsPolicy":{},"f:restartPolicy":{},"f:schedulerName":{},"f:securityContext":{},"f:terminationGracePeriodSeconds":{}}}}}}]},"spec":{"replicas":0,"selector":{"matchLabels":{"app":"test-deployment"}},"template":{"metadata":{"creationTimestamp":null,"labels":{"app":"test-deployment"}},"spec":{"containers":[{"name":"example-web","image":"{{% param "images.training-image-url" %}}","resources":{},"terminationMessagePath":"/dev/termination-log","terminationMessagePolicy":"File","imagePullPolicy":"Always"}],"restartPolicy":"Always","terminationGracePeriodSeconds":30,"dnsPolicy":"ClusterFirst","securityContext":{},"schedulerName":"default-scheduler"}},"strategy":{"type":"RollingUpdate","rollingUpdate":{"maxUnavailable":"25%","maxSurge":"25%"}},"revisionHistoryLimit":10,"progressDeadlineSeconds":600},"status":{}} +I1114 15:31:13.676116 85289 request.go:1073] Response Body: {"kind":"Deployment","apiVersion":"apps/v1","metadata":{"name":"test-deployment","namespace":"acend-test","uid":"a6985d28-3caa-451f-a648-4c7cde3b51ac","resourceVersion":"2069385577","generation":1,"creationTimestamp":"2022-11-14T14:31:13Z","labels":{"app":"test-deployment"},"managedFields":[{"manager":"kubectl-create","operation":"Update","apiVersion":"apps/v1","time":"2022-11-14T14:31:13Z","fieldsType":"FieldsV1","fieldsV1":{"f:metadata":{"f:labels":{".":{},"f:app":{}}},"f:spec":{"f:progressDeadlineSeconds":{},"f:replicas":{},"f:revisionHistoryLimit":{},"f:selector":{},"f:strategy":{"f:rollingUpdate":{".":{},"f:maxSurge":{},"f:maxUnavailable":{}},"f:type":{}},"f:template":{"f:metadata":{"f:labels":{".":{},"f:app":{}}},"f:spec":{"f:containers":{"k:{\"name\":\"example-web\"}":{".":{},"f:image":{},"f:imagePullPolicy":{},"f:name":{},"f:resources":{},"f:terminationMessagePath":{},"f:terminationMessagePolicy":{}}},"f:dnsPolicy":{},"f:restartPolicy":{},"f:schedulerName":{},"f:securityContext":{},"f:terminationGracePeriodSeconds":{}}}}}}]},"spec":{"replicas":0,"selector":{"matchLabels":{"app":"test-deployment"}},"template":{"metadata":{"creationTimestamp":null,"labels":{"app":"test-deployment"}},"spec":{"containers":[{"name":"example-web","image":"{{% param "containerImages.training-image-url" %}}","resources":{},"terminationMessagePath":"/dev/termination-log","terminationMessagePolicy":"File","imagePullPolicy":"Always"}],"restartPolicy":"Always","terminationGracePeriodSeconds":30,"dnsPolicy":"ClusterFirst","securityContext":{},"schedulerName":"default-scheduler"}},"strategy":{"type":"RollingUpdate","rollingUpdate":{"maxUnavailable":"25%","maxSurge":"25%"}},"revisionHistoryLimit":10,"progressDeadlineSeconds":600},"status":{}} deployment.apps/test-deployment created ```