diff --git a/.github/workflows/tag-and-build.yml b/.github/workflows/tag-and-build.yml index 827a33c66..64bf95a0b 100644 --- a/.github/workflows/tag-and-build.yml +++ b/.github/workflows/tag-and-build.yml @@ -101,6 +101,11 @@ jobs: sed -i -E "s/(.*MCAD_REF \?= ).*/\1release-\${MCAD_VERSION}/" Makefile sed -i -E "s/(.*INSTASCALE_VERSION \?= ).*/\1${{ github.event.inputs.instascale-version }}/" Makefile + - name: Update image version in params.env + run: | + VERSION=${{ github.event.inputs.version }} perl -i -pe 's/:(.*)$/:$ENV{"VERSION"}/' config/manager/params.env + shell: bash + - name: Login to Quay.io uses: redhat-actions/podman-login@v1 with: @@ -146,7 +151,7 @@ jobs: uses: stefanzweifel/git-auto-commit-action@v4 with: commit_message: Update dependency versions for release ${{ github.event.inputs.version }} - file_pattern: 'README.md *.yaml Makefile go.mod go.sum' + file_pattern: 'README.md *.yaml Makefile go.mod go.sum *.env' create_branch: true branch: ${{ env.PR_BRANCH_NAME }} diff --git a/Makefile b/Makefile index d32fdc01f..4e12f0316 100644 --- a/Makefile +++ b/Makefile @@ -198,7 +198,7 @@ uninstall: manifests kustomize ## Uninstall CRDs from the K8s cluster specified .PHONY: deploy deploy: manifests kustomize ## Deploy controller to the K8s cluster specified in ~/.kube/config. - cd config/manager && $(KUSTOMIZE) edit set image controller=${IMG} + cd config/manager && IMAGE=$(IMG) perl -i -pe 's/odh-codeflare-operator-controller-image=(.*)$$/odh-codeflare-operator-controller-image=$$ENV{"IMAGE"}/' params.env $(KUSTOMIZE) build config/${ENV} | kubectl apply -f - git restore config/* diff --git a/config/manager/kustomization.yaml b/config/manager/kustomization.yaml index 4fe5ccaa3..bffd07e5a 100644 --- a/config/manager/kustomization.yaml +++ b/config/manager/kustomization.yaml @@ -1,5 +1,21 @@ resources: - manager.yaml +configMapGenerator: +- name: codeflare-stack-config + envs: + - params.env +configurations: + - params.yaml + +vars: +- name: odh_codeflare_operator_controller_image + objref: + kind: ConfigMap + name: codeflare-stack-config + apiVersion: v1 + fieldref: + fieldpath: data.odh-codeflare-operator-controller-image + generatorOptions: disableNameSuffixHash: true diff --git a/config/manager/manager.yaml b/config/manager/manager.yaml index ae13f8af5..717cf0355 100644 --- a/config/manager/manager.yaml +++ b/config/manager/manager.yaml @@ -34,7 +34,7 @@ spec: containers: - command: - /manager - image: controller:latest + image: $(odh_codeflare_operator_controller_image) imagePullPolicy: Always name: manager securityContext: diff --git a/config/manager/params.env b/config/manager/params.env new file mode 100644 index 000000000..df229319c --- /dev/null +++ b/config/manager/params.env @@ -0,0 +1 @@ +odh-codeflare-operator-controller-image=quay.io/project-codeflare/codeflare-operator:v1.0.1 diff --git a/config/manager/params.yaml b/config/manager/params.yaml new file mode 100644 index 000000000..43509ff29 --- /dev/null +++ b/config/manager/params.yaml @@ -0,0 +1,3 @@ +varReference: + - path: spec/template/spec/containers[]/image + kind: Deployment diff --git a/config/manifests/bases/codeflare-operator.clusterserviceversion.yaml b/config/manifests/bases/codeflare-operator.clusterserviceversion.yaml deleted file mode 100644 index 77295679c..000000000 --- a/config/manifests/bases/codeflare-operator.clusterserviceversion.yaml +++ /dev/null @@ -1,71 +0,0 @@ -apiVersion: operators.coreos.com/v1alpha1 -kind: ClusterServiceVersion -metadata: - annotations: - alm-examples: '[]' - capabilities: Basic Install - categories: AI/Machine Learning, Big Data - operatorframework.io/suggested-namespace: openshift-operators - repository: https://github.com/project-codeflare/codeflare-operator - support: Community - name: codeflare-operator.v0.0.1 - namespace: placeholder -spec: - apiservicedefinitions: {} - customresourcedefinitions: - owned: - - description: AppWrapper is the Schema for the AppWrapper API - displayName: AppWrapper - kind: AppWrappers - name: appwrappers.workload.codeflare.dev - version: v1beta1 - - description: SchedulingSpec is the Schema for the SchedulingSpec API - displayName: SchedulingSpec - kind: SchedulingSpecs - name: schedulingspecs.workload.codeflare.dev - version: v1beta1 - - description: QuotaSubtree is the Schema for the QuotaSubtree API - displayName: QuotaSubtree - kind: QuotaSubtrees - name: quotasubtrees.quota.codeflare.dev - version: v1 - description: CodeFlare allows you to scale complex pipelines anywhere - displayName: CodeFlare Operator - icon: - - base64data: iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAIAAAAiOjnJAAAPZ0lEQVR4Ae2cT0wbxx7Hn8wf88cEsIQloOGhh5ErsHBEDKkrYdWBIIeE+gUijKiTYgUofgZhQgzS+rCH12N7zDXXHNtjrrnmmmOvufbKlSfye5lOZsbLOPGPoO03sqLx7G9nZ77z2e/Ozoz5RyAcxQcKNF2BfzS9RBQIBQLhKMCCYbMoALBYZIVpASyAxaIAwGKRFY4FsAAWiwIAi0VWOBbAAlgsCgAsFlnhWAALYLEoALBYZIVjASyAxaIAwGKRFY4FsAAWiwIAi0VWOBbAAlgsCgAsFlnhWAALYLEoALBYZIVjASyAxaIAwGKRFY4FsAAWiwIAi0VWOBbAAlgsCgAsFlnhWAALYLEoALBYZIVjASyAxaIAwGKRFY4FsAAWiwIAi0VWOBbAAlgsCgAsFlnhWAALYLEoALBYZIVjASyAxaIAwGKRFY4FsAAWiwIAi0VWOBbAAlgsCgAsFlnhWAALYLEoALBYZIVjASyAxaIAwGKRFY4FsAAWiwIAi0VWOBbAAlgsCgAsFlnhWAALYLEoALBYZIVjASyAxaIAwGKRFY4FsAAWiwIAi0VWOBbAAlgsCgAsFlnhWAALYLEoALBYZIVjASyAxaIAwGKRFY4FsAAWiwIAi0VWOBbAAlgsCgAsFlnhWAALYLEoALBYZIVjASyAxaIAwGKRFY4FsAAWiwIAi0VWOBbAAlgsCgAsFlnhWAALYLEoALBYZIVjASyAxaIAwGKRFY4FsAAWiwL+BCu9mNsp7V1x22hPlHoKb+VPR/qXK15n++rZgjUaT6Uy95dXN+iTytwfvzFnf5lLjlxe3XBd95Iv2ujlgrdqfQdn8qfr7stGC7my8ReAFYzE0ou56vGJ++Ffeb/yIelWj0/Si7lgJHbVmscNVms0JwNhn26N5oRWf1+whmOzlcMj13WLW6XkXDY0NClECQ1NTiQzxa2S67qVw6PI2LQ4dBUSAOuL90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gylblf2NwWsO6U9pZXNyzRFGWOxlNUH/qBTeXwWWFzO5W5L+xwNJ7yfvJ6F5VezImiRORHife/i1Lmoz8K+LB4bJU5EG+LF+XSPprFHvjww6/3O4bp11fqo2cg3p74T70S5HxKf1S+Z1VbBmc6vv25+8ErMa/Rs/lH6OHrjvSvraat7qK9VmCJaCSggKUCAIvlDyVaqu/jMIAFsFgUAFgssvrYiiybBrAAFosCAItFVsvb2sdhAAtgsSgAsFhk9bEVWTYNYAEsFgUAFouslre1j8MAFsBiUQBgscjqYyuybBrAAlgsCgAsFlktb2sfhwEsgMWiAMBikdXHVmTZNIAFsFgUAFgsslre1j4OA1gAi0UBgMUiq4+tyLJpAAtgsSgAsFhktbytfRwGsAAWiwIAi0VWH1uRZdMAFsBiUQBgschqeVv7OAxgASwWBQAWi6w+tiLLpgEsgMWiAMBikdXytvZxGMACWCwKACwWWX1sRZZNA1gAi0UBgMUiq+Vt7eMwgAWwWBQAWCyy+tiKLJsGsAAWiwIAi0VWy9vax2EAC2CxKACwWGT1sRVZNg1gASwWBQAWi6yWt7WPwwAWwGJRAGCxyOpjK7JsGsACWCwKACwWWS1vax+HASyAxaIAwGKR1cdWZNk0gAWwWBQAWCyyWt7WPg4DWACLRQGAxSKrj63IsmkAC2CxKACwWGS1vK19HAawABaLAgCLRVYfW5Fl0wAWwGJRAGCxyGp5W/s4DGABLBYFABaLrD62IsumASyAxaIAwGKR1fK29nEYwAJYLAoALBZZfWxFlk0DWACLRQGAxSKr5W3t4zCABbBYFABYLLL62IosmwawABaLAgCLRVbL29rHYQALYLEoALBYZPWxFVk2DWABLBYFABaLrJa3tY/DABbAYlEAYLHI6mMrsmwawAJYLAoALBZZLW9rH4cBLIDFogDAYpHVx1Zk2TSABbBYFABYLLJa3tY+DgNYAItFAYDFIquPrciyaQALYLEoALBYZLW8rX0cBrAAFosCAItFVh9bkWXT/geIErZVuGmeEwAAAABJRU5ErkJggg== - mediatype: image/png - install: - spec: - deployments: null - strategy: "" - installModes: - - supported: false - type: OwnNamespace - - supported: false - type: SingleNamespace - - supported: false - type: MultiNamespace - - supported: true - type: AllNamespaces - keywords: - - Pipelines - - Scaling - - MCAD - - App - - InstaScale - - Jobs - links: - - name: Codeflare Operator - url: https://codeflare.dev/ - maintainers: - - email: aasthana@redhat.com - name: Anish Asthana - - email: kpostlet@redhat.com - name: Kevin Postlethwait - - email: meyceoz@redhat.com - name: Mustafa Eyceoz - maturity: alpha - provider: - name: CodeFlare - url: https://github.com/project-codeflare - version: 0.0.1 diff --git a/config/manifests/kustomization.yaml b/config/manifests/kustomization.yaml deleted file mode 100644 index 958a9e247..000000000 --- a/config/manifests/kustomization.yaml +++ /dev/null @@ -1,8 +0,0 @@ -# These resources constitute the fully configured set of manifests -# used to generate the 'manifests/' directory in a bundle. -resources: -- bases/codeflare-operator.clusterserviceversion.yaml -- ../default -- ../scorecard -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization