17.2.3 Creating the domain-upgrade-pod.yaml

Run the following steps to create the domain-upgrade-pod.yaml file:
  1. In the <workdir>/upgradescripts directory create a domain-upgrade-pod.yaml and replace the environment variables listed, with the corresponding values collected in Upgrade Prerequisite Steps:
    apiVersion: v1
    kind: Pod
    metadata:
      labels:
        weblogic.domainUID: %DOMAIN_UID%
        weblogic.domainName: %DOMAIN_UID%
        app: %DOMAIN_UID%-domain-upgrade
      name: %DOMAIN_UID%-domain-upgrade
      namespace: %NAMESPACE%
    spec:
      containers:
      - args:
        - sleep
        - infinity
        image: %WEBLOGIC_IMAGE%
        imagePullPolicy: %WEBLOGIC_IMAGE_PULL_POLICY%
        name: %DOMAIN_UID%-domain-upgrade
        volumeMounts:
        - mountPath: /u01/scripts
          name: domain-upgrade-cm-volume
        - mountPath: %DOMAIN_MOUNT_PATH%
          name: domain-storage-volume
        - mountPath: /weblogic-operator/rcu-secrets
          name: rcu-credentials-volume
        env:
        - name: DOMAIN_UID
          value: "%DOMAIN_UID%"
        - name: DOMAIN_ROOT_DIR
          value: "%DOMAIN_ROOT_DIR%"
        - name: DOMAIN_HOME_DIR
          value: "%DOMAIN_HOME%"
        - name: DOMAIN_NAME
          value: "%DOMAIN_UID%"
        - name: CONNECTION_STRING
          value: "%CONNECTION_STRING%"
        - name: RCUPREFIX
          value: "%RCU_PREFIX%"
        - name: DOMAIN_TYPE
          value: "OAM"
        - name: SECURE_ENABLED
          value: "false"
      volumes:
      - name: domain-upgrade-cm-volume
        configMap:
          name: %DOMAIN_UID%-domain-upgrade-pod-cm
      - name: domain-storage-volume
        persistentVolumeClaim:
          claimName: %DOMAIN_PVC_NAME%
      - name: rcu-credentials-volume
        secret:
          secretName: %RCU_CREDENTIALS_SECRET_NAME%
    For example:
    
    apiVersion: v1
    kind: Pod
    metadata:
      labels:
        weblogic.domainUID: accessdomain
        weblogic.domainName: accessdomain
        app: accessdomain-domain-upgrade
      name: accessdomain-domain-upgrade
      namespace: oamns
    spec:
      containers:
      - args:
        - sleep
        - infinity
        image: container-registry.oracle.com/middleware/oam_cpu:14.1.2.1.0-jdk17-ol8-<YYMMDD>
        imagePullPolicy: IfNotPresent
        name: accessdomain-domain-upgrade
        volumeMounts:
        - mountPath: /u01/scripts
          name: domain-upgrade-cm-volume
        - mountPath: /u01/oracle/user_projects
          name: domain-storage-volume
        - mountPath: /weblogic-operator/rcu-secrets
          name: rcu-credentials-volume
        env:
        - name: DOMAIN_UID
          value: "accessdomain"
        - name: DOMAIN_ROOT_DIR
          value: " /u01/oracle/user_projects/domains"
        - name: DOMAIN_HOME_DIR
          value: " /u01/oracle/user_projects/domains/accessdomain"
        - name: DOMAIN_NAME
          value: "accessdomain"
        - name: CONNECTION_STRING
          value: "mydatabasehost.example.com:1521/orcl.example.com"
        - name: RCUPREFIX
          value: "OAMK8S"
        - name: DOMAIN_TYPE
          value: "OAM"
        - name: SECURE_ENABLED
          value: "false"
      volumes:
      - name: domain-upgrade-cm-volume
        configMap:
          name: accessdomain-domain-upgrade-pod-cm
      - name: domain-storage-volume
        persistentVolumeClaim:
          claimName: accessdomain-domain-pvc
      - name: rcu-credentials-volume
        secret:
          secretName: accessdomain-rcu-credentials