This operator manages OpenShift RunOnceDurationOverride Admission Webhook Server.
RunOnceDurationOverride Admission Webhook Server is located at run-once-duration-override.
releases:
- {version: "1.0.0", ocp: "4.13, 4.14", k8s: "1.26", go: "1.20", release_branch: "4.13"}
- {version: "1.0.1-1.0.4", ocp: "4.13, 4.14", k8s: "1.27", go: "1.20", release_branch: "4.14"}
- {version: "1.1.0", ocp: "4.15, 4.16", k8s: "1.28", go: "1.20", release_branch: "4.15"}
- {version: "1.1.1-1.1.4", ocp: "4.15, 4.16", k8s: "1.29", go: "1.21", release_branch: "4.16"}
- {version: "1.2.0", ocp: "4.17, 4.18", k8s: "1.30", go: "1.22", release_branch: "4.17"}
- {version: "1.2.1-1.2.4", ocp: "4.17, 4.18", k8s: "1.31", go: "1.22", release_branch: "4.18"}
- {version: "1.3.0", ocp: "4.19, 4.20", k8s: "1.32", go: "1.23", release_branch: "4.19"}
- {version: "1.3.1-1.3.2", ocp: "4.19, 4.20", k8s: "1.33", go: "1.24", release_branch: "4.20"}
- {version: "1.4.0", ocp: "4.21, 4.22", k8s: "1.34", go: "1.24", release_branch: "4.21"}
- {version: "1.4.1-1.4.2", ocp: "4.21, 4.22", k8s: "1.35", go: "1.25", release_branch: "4.22"}
- {version: "1.5.0", ocp: "5.0", k8s: "1.36", go: "1.26", release_branch: "5.0"}
-
Build and push the operator image to a registry:
export QUAY_USER=${your_quay_user_id} export IMAGE_TAG=${your_image_tag} podman build -t quay.io/${QUAY_USER}/run-once-duration-override-operator:${IMAGE_TAG} -f Dockerfile.rhel7 . podman login quay.io -u ${QUAY_USER} podman push quay.io/${QUAY_USER}/run-once-duration-override-operator:${IMAGE_TAG}
-
Update the image spec under
.spec.template.spec.containers[0].imagefield in thedeploy/07_deployment.yamlDeployment to point to the newly built image -
Update the
RELATED_IMAGE_OPERAND_IMAGEenv value under.spec.template.spec.containers[0].envsfield in thedeploy/07_deployment.yamlto point to the admission webhook image -
Update the
.spec.runOnceDurationOverride.spec.activeDeadlineSecondsunderdeploy/08_cr.yamlas needed -
Apply the manifests from
deploydirectory:oc apply -f deploy/
This process requires access to the Brew building system.
- List available bundle images (as IMAGE):
$ brew list-builds --package=run-once-duration-override-operator-bundle-container
- Get pull secret for selected bundle image (as IMAGE_PULL):
$ brew --noauth call --json getBuild IMAGE |jq -r '.extra.image.index.pull[0]'
- Build the index image (with IMAGE_TAG):
$ opm index add --bundles IMAGE_PULL --tag quay.io/${QUAY_USER}/run-once-duration-override-operator-index:IMAGE_TAG
This process refers to building the operator in a way that it can be installed locally via the OperatorHub with a custom index image
-
Build and push the operator image to a registry:
export QUAY_USER=${your_quay_user_id} export IMAGE_TAG=${your_image_tag} podman build -t quay.io/${QUAY_USER}/run-once-duration-override-operator:${IMAGE_TAG} -f Dockerfile.rhel7 . podman login quay.io -u ${QUAY_USER} podman push quay.io/${QUAY_USER}/run-once-duration-override-operator:${IMAGE_TAG}
-
Update the
.spec.install.spec.deployments[0].spec.template.spec.containers[0].imagefield in the RODOO CSV undermanifests/runoncedurationoverride-operator.clusterserviceversion.yamlto point to the newly built image. -
Update the
RELATED_IMAGE_OPERAND_IMAGEenv value under.spec.install.spec.deployments[0].spec.template.spec.containers[0].envsfield in the RODOO CSV undermanifests/runoncedurationoverride-operator.clusterserviceversion.yamlto point to the admission webhook image. -
build and push the metadata image to a registry (e.g. https://quay.io):
podman build -t quay.io/${QUAY_USER}/run-once-duration-override-operator-metadata:${IMAGE_TAG} -f Dockerfile.metadata . podman push quay.io/${QUAY_USER}/run-once-duration-override-operator-metadata:${IMAGE_TAG}
-
build and push image index for operator-registry (pull and build https://github.com/operator-framework/operator-registry/ to get the
opmbinary)opm index add --bundles quay.io/${QUAY_USER}/run-once-duration-override-operator-metadata:${IMAGE_TAG} --tag quay.io/${QUAY_USER}/run-once-duration-override-operator-index:${IMAGE_TAG} podman push quay.io/${QUAY_USER}/run-once-duration-override-operator-index:${IMAGE_TAG}
Don't forget to increase the number of open files, .e.g.
ulimit -n 100000in case the current limit is insufficient. -
create and apply catalogsource manifest (notice to change <<QUAY_USER>> and <<IMAGE_TAG>> to your own values)::
apiVersion: operators.coreos.com/v1alpha1 kind: CatalogSource metadata: name: run-once-duration-override-operator namespace: openshift-marketplace spec: sourceType: grpc image: quay.io/<<QUAY_USER>>/run-once-duration-override-operator-index:<<IMAGE_TAG>>
-
create
openshift-run-once-duration-override-operatornamespace:$ oc create ns openshift-run-once-duration-override-operator -
open the console Operators -> OperatorHub, search for
Run Once Duration Override Operatorand install the operator -
create CR for the Run Once Duration Override Operator in the console:
apiVersion: operator.openshift.io/v1 kind: RunOnceDurationOverride metadata: name: cluster spec: runOnceDurationOverride: spec: activeDeadlineSeconds: 3600
This repository is compatible with the OpenShift Tests Extension (OTE) framework.
make build# Run a specific test suite or test
./run-once-duration-override-operator-tests-ext run-suite openshift/run-once-duration-override-operator/operator/serial
./run-once-duration-override-operator-tests-ext run-test "test-name"
# To run serial suites cases serially, use the following command:
./run-once-duration-override-operator-tests-ext run-suite openshift/run-once-duration-override-operator/operator/serial -c 1
# Run with JUnit output
./run-once-duration-override-operator-tests-ext run-suite openshift/run-once-duration-override-operator/operator/serial --junit-path=/tmp/junit.xml
./run-once-duration-override-operator-tests-ext run-test "test-name" --junit-path=/tmp/junit.xml# List all test suites
./run-once-duration-override-operator-tests-ext list suites
# List tests in a suite
./run-once-duration-override-operator-tests-ext list tests --suite=openshift/run-once-duration-override-operator/operator/serialFor more information about the OTE framework, see the openshift-tests-extension documentation.