Updating Siebel Operator Manifest with Custom Non-Root User ID and Group ID

To update the Siebel Operator manifest:

  1. Open the Siebel Operator manifest file:
    vi /home/opc/siebel/<ENV_ID>/<env_namespace>-helmcharts/siebel-operator/manifest/siebel-operator.yaml
  2. Add the securityContext section under spec.template.spec:
    apiVersion: apps/v1
    kind: Deployment
    metadata:
      name: siebel-controller
    spec:
      template:
        spec:
          serviceAccountName: get-and-create-configmaps
          containers:
          - name: controller
            image: siebel-operator-base:<siebel_operator_base_tag>
            command: ["/bin/bash", "-c", "python /hooks/sync.py"]
          securityContext:
            runAsUser: <siebel_run_as_user>
            runAsGroup: 0
            fsGroup: <siebel_fs_group>
  3. Commit, push, and reconcile the Siebel Operator changes:
    cd /home/opc/siebel/<ENV_ID>/<env_namespace>-helmcharts
    git status
    git diff siebel-operator/manifest/siebel-operator.yaml
    git add siebel-operator/manifest/siebel-operator.yaml
    git commit -m "Update Siebel operator runtime security context"
    git push
  4. Reconcile the Git source and the Siebel Operator Kustomization:
    cd /home/opc/siebel/<ENV_ID>/
    source k8sprofile
    flux reconcile source git siebel-repo -n <env_namespace>
    flux reconcile kustomization siebel-operator -n <env_namespace>
  5. Verify that the Kustomization is ready and that the operator pod is running:
    flux get kustomization siebel-operator -n <env_namespace>
    kubectl get pods -n <env_namespace> | grep siebel-controller