Modify a Replicated TimesTenClassic Object

Let's modify a replicated TimesTenClassic object.
  1. Review the TimesTenClassic objects running in your namespace.
    kubectl get ttc

    The output is similar to the following:

    NAME             STATE              ACTIVE           AGE
    mannorepsample   AllReplicasReady   N/A              30h
    manrepsample     Normal             manrepsample-0   54m
    norepsample      AllReplicasReady   N/A              21h
    repsample        Normal             repsample-0      50m

    There are several TimesTenClassic objects running in your namespace. One of the replicated TimesTenClassic objects is manrepsample. Its high level state is Normal indicating TimesTen databases in the active standby pair are up and running and functioning properly.

  2. Review the image upgrade strategy for the object.
    kubectl get ttc manrepsample -o yaml | grep imageUpgradeStrategy

    The output is the following:

    imageUpgradeStrategy: Manual

    The image upgrade strategy is Manual , indicating a manual upgrade strategy.

  3. On your development host, edit the TimesTenClassic object's .spec.ttspec.image datum with the container image you want to use for the upgrade. This example uses container-registry.oracle.com/timesten/timesten:22.1.1.35.0.
    1. Edit the file, replacing the image value with container-registry.oracle.com/timesten/timesten:22.1.1.35.0.
       kubectl edit ttc manrepsample
      
      # Please edit the object below. Lines beginning with a '#' will be ignored,
      # and an empty file will abort the edit. If an error occurs while saving this file will be
      # reopened with the relevant failures.
      #
      apiVersion: timesten.oracle.com/v4
      kind: TimesTenClassic
      ...
          image: container-registry.oracle.com/timesten/timesten:22.1.1.35.0
      ...
    2. Save the file and exit from the editor.
  4. Confirm the StatefulSet contains the new image.
    kubectl describe statefulset manrepsample | grep Image

    The output is the following:

    Image:      container-registry.oracle.com/timesten/timesten:22.1.1.35.0
    Image:      container-registry.oracle.com/timesten/timesten:22.1.1.35.0
    Image:      container-registry.oracle.com/timesten/timesten:22.1.1.35.0
    Image:      container-registry.oracle.com/timesten/timesten:22.1.1.35.0

    When the TimesTen Operator detects that there is an update to the TimesTenClassic's .spec.ttspec.image datum, it modifies the StatefulSet with the new image. Since this is a manual upgrade of a replicated TimesTenClassic object, the TimesTen Operator takes no further action. This enables you to initiate the manual upgrade.

You successfully modified the TimesTenClassic object. Let's continue the manual upgrade by upgrading the standby database.