This is a cache of https://docs.okd.io/4.13/operators/operator_sdk/ansible/osdk-ansible-updating-projects.html. It is a snapshot of the page at 2024-11-24T00:28:39.466+0000.
Updating Ansible-based projects - Developing Operators | Operators | OKD 4.13
×

OKD 4.13 supports Operator SDK 1.28.0. If you already have the 1.25.4 CLI installed on your workstation, you can update the CLI to 1.28.0 by installing the latest version.

However, to ensure your existing Operator projects maintain compatibility with Operator SDK 1.28.0, update steps are required for the associated breaking changes introduced since 1.25.4. You must perform the update steps manually in any of your Operator projects that were previously created or maintained with 1.25.4.

Updating Ansible-based Operator projects for Operator SDK 1.28.0

The following procedure updates an existing Ansible-based Operator project for compatibility with 1.28.0.

Prerequisites
  • Operator SDK 1.28.0 installed

  • An Operator project created or maintained with Operator SDK 1.25.4

Procedure
  1. Update the image tag in your Operator’s Dockerfile as shown in the following example:

    Example Dockerfile
    FROM registry.redhat.io/openshift4/ose-ansible-operator:v4.13 (1)
    1 Update the version tag to v4.13.
  2. Find the ose-kube-rbac-proxy pull spec in the following files, and update the image tag to v4.13:

    • config/default/manager_auth_proxy_patch.yaml

    • bundle/manifests/memcached-operator.clusterserviceversion.yaml

    
          containers:
          - name: kube-rbac-proxy
            image: registry.redhat.io/openshift4/ose-kube-rbac-proxy:v4.13 (1)
    
    1 Update the tag version from v4.12 to v4.13.
  3. Update your Makefile’s run target to the following:

    .PHONY: run
    ANSIBLE_ROLES_PATH?="$(shell pwd)/roles"
    run: ansible-operator ## Run against the configured Kubernetes cluster in ~/.kube/config
        $(ANSIBLE_OPERATOR) run
  4. To upgrade the kubernetes.core collection to v2.4.0, replace the following in your project’s requirements.yaml file:

      - name: kubernetes.core
        version: "2.3.1"

    with:

      - name: kubernetes.core
        version: "2.4.0"