Patching of media containers
This section describes the procedure for patching of the following media containers:
Patching for media server
Patching Init containers for media server
Patching Sidecar containers for media server:
Profile name | Main container keyword | Init container keyword | Sidecar container keyword |
|---|---|---|---|
Media | media.main | media.pod-dependency-init | media.fluentbit |
- Get the environment name using the following command:
kubectl get environments -n <namespace>
- Using the following command, check if ServiceImageTag is present:
kubectl get environment -n <namespace> -o=jsonpath='{$.items[0].spec.mediaServers[0].serviceImageTag}'
- Depending on the output of step 2, perform one of the following steps.
If ServiceImageTag is present (some content is there in the output) or not present (no content is there in the output). Run the following command by changing the value field (for example,
<version>-patch) to the required image tag:If serviceImageTag is present:
kubectl patch environment <env-name> -n <namespace> --type=json --patch '[{"op": "replace", "path": "/spec/mediaServers/0/serviceImageTag/<container keyword>", "value": "<version>-patch"}]''
For example, kubectl patch environment <env-name> -n <namespace> --type=json --patch '[{"op": "replace", "path": "/spec/mediaServers/0/serviceImageTag/media.main", "value": "11.0-patch"}]'
Or
If serviceImageTag is not present:
kubectl patch environment <env-name> -n <namespace> --type=json --patch '[{"op": "replace", "path": "/spec/mediaServers/0/serviceImageTag", "value": {}},{"op": "replace", "path": "/spec/mediaServers/0/serviceImageTag/<container keyword>", "value": "<version>-patch"}]''
For example, kubectl patch environment <env-name> -n <namespace> --type=json --patch '[{"op": "replace", "path": "/spec/mediaServers/0/serviceImageTag", "value": {}},{"op": "replace", "path": "/spec/mediaServers/0/serviceImageTag/media.main", "value": "11.0-patch"}]'
- Get the environment name using the following command:
kubectl get environments -n <namespace>
- Use this when you want to patch a specific Init container for all the profiles (wherever applicable) of the media server.
Init container keyword:
pod-dependency-initFor example, the pod-dependency-init container patch image:
netbackup/operator:<version>-patch - Depending on the output of step 2, perform one of the following steps.
If ServiceImageTag is present (some content is there in the output) or not present (no content is there in the output). Run the following command by changing the value field (for example,
<version>-patch) to the required image tag:If serviceImageTag is present:
kubectl patch environment <env-name> -n <namespace> --type=json --patch '[{"op": "replace", "path": "/spec/mediaServers/0/serviceImageTag/<Init containers keyword>", "value": "<version>-patch"}]'
For example, kubectl patch environment <env-name> -n <namespace> --type=json --patch '[{"op": "replace", "path": "/spec/mediaServers/0/serviceImageTag/pod-dependency-init", "value": "11.0-patch"}]'
Or
If serviceImageTag is not present:
kubectl patch environment <env-name> -n <namespace> --type=json --patch '[{"op": "replace", "path": "/spec/mediaServers/0/serviceImageTag", "value": {}},{"op": "replace", "path": "/spec/mediaServers/0/serviceImageTag/<Init containers keyword>", "value": "<version>-patch"}]'
For example, kubectl patch environment <env-name> -n <namespace> --type=json --patch '[{"op": "replace", "path": "/spec/mediaServers/0/serviceImageTag", "value": {}},{"op": "replace", "path": "/spec/mediaServers/0/serviceImageTag/pod-dependency-init", "value": "11.0-patch"}]'
- Get the environment name using the following command:
kubectl get environments -n <namespace>
- Use this when you want to patch a specific Sidecar container for all the profiles (wherever applicable) of the media server.
Sidecar container keyword:
fluentbit - Depending on the output of step 2, perform one of the following steps.
If ServiceImageTag is present (some content is there in the output) or not present (no content is there in the output). Run the following command by changing the value field (for example,
<version>-patch) to the required image tag:If serviceImageTag is present:
kubectl patch environment <env-name> -n <namespace> --type=json --patch '[{"op": "replace", "path": "/spec/mediaServers/0/serviceImageTag/<Sidecar containers keyword>", "value": "<version>-patch"}]'
For example, kubectl patch environment <env-name> -n <namespace> --type=json --patch '[{"op": "replace", "path": "/spec/mediaServers/0/serviceImageTag/fluentbit", "value": "11.0-patch"}]'
Or
If serviceImageTag is not present:
kubectl patch environment <env-name> -n <namespace> --type=json --patch '[{"op": "replace", "path": "/spec/mediaServers/0/serviceImageTag", "value": {}},{"op": "replace", "path": "/spec/mediaServers/0/serviceImageTag/<SideCar containers keyword>", "value": "<version>-patch"}]'
For example, kubectl patch environment <env-name> -n <namespace> --type=json --patch '[{"op": "replace", "path": "/spec/mediaServers/0/serviceImageTag", "value": {}},{"op": "replace", "path": "/spec/mediaServers/0/serviceImageTag/fluentbit", "value": "11.0-patch"}]'