-
Notifications
You must be signed in to change notification settings - Fork 6
HYPERFLEET-1411 - feat: Add hyperfleet-operator image and bundle components #7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
ma-hill
wants to merge
4
commits into
openshift-hyperfleet:main
Choose a base branch
from
ma-hill:HYPERFLEET-1411-2
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
d6f4dff
HYPERFLEET-1411 - feat: Add hyperfleet-operator image and bundle comp…
ma-hill c6ebe8c
HYPERFLEET-1411 - feat: Add hyperfleet-operator image and bundle comp…
ma-hill 22e023d
HYPERFLEET-1411 - feat: Address comments from PR
ma-hill a89dc8f
HYPERFLEET-1411 - feat: Updates to add in API image
ma-hill File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,6 +5,7 @@ | |
| *.so | ||
| *.dylib | ||
| bin/* | ||
| dist/ | ||
| _output/ | ||
| Dockerfile.cross | ||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| #!/usr/bin/env bash | ||
| set -euo pipefail | ||
|
|
||
| CSV_FILE="${CSV_FILE:-/manifests/hyperfleet-operator.clusterserviceversion.yaml}" | ||
|
|
||
| # Update image references in the CSV file using yq | ||
| yq eval ' | ||
| # Update operator deployment image | ||
| (.spec.install.spec.deployments[].spec.template.spec.containers[] | select(.name == "manager") | .image) = strenv(HYPERFLEET_OPERATOR_IMAGE_PULLSPEC) | | ||
|
|
||
| # Update RELATED_IMAGE_HYPERFLEET_API env var | ||
| (.spec.install.spec.deployments[].spec.template.spec.containers[] | select(.name == "manager") | .env[] | select(.name == "RELATED_IMAGE_HYPERFLEET_API") | .value) = strenv(HYPERFLEET_API_IMAGE_PULLSPEC) | | ||
|
|
||
| # Update containerImage annotation | ||
| .metadata.annotations.containerImage = strenv(HYPERFLEET_OPERATOR_IMAGE_PULLSPEC) | | ||
|
|
||
| # Update relatedImages | ||
| .spec.relatedImages = [ | ||
| {"name": "hyperfleet-operator", "image": strenv(HYPERFLEET_OPERATOR_IMAGE_PULLSPEC)}, | ||
| {"name": "hyperfleet-api", "image": strenv(HYPERFLEET_API_IMAGE_PULLSPEC)} | ||
| ] | ||
| ' -i "${CSV_FILE}" | ||
|
|
||
| cat "${CSV_FILE}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| FROM scratch | ||
|
|
||
| # Core bundle labels. | ||
| LABEL operators.operatorframework.io.bundle.mediatype.v1=registry+v1 | ||
| LABEL operators.operatorframework.io.bundle.manifests.v1=manifests/ | ||
| LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/ | ||
| LABEL operators.operatorframework.io.bundle.package.v1=hyperfleet-operator | ||
| LABEL operators.operatorframework.io.bundle.channels.v1=stable | ||
| LABEL operators.operatorframework.io.bundle.channel.default.v1=stable | ||
| LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.42.3 | ||
| LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1 | ||
| LABEL operators.operatorframework.io.metrics.project_layout=go.kubebuilder.io/v4 | ||
|
|
||
| # Labels for testing. | ||
| LABEL operators.operatorframework.io.test.mediatype.v1=scorecard+v1 | ||
| LABEL operators.operatorframework.io.test.config.v1=tests/scorecard/ | ||
|
|
||
| # Copy files to locations specified by labels. | ||
| COPY bundle/manifests /manifests/ | ||
| COPY bundle/metadata /metadata/ | ||
| COPY bundle/tests/scorecard /tests/scorecard/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| # Konflux bundle image build. Unlike the auto-generated bundle.Dockerfile (used | ||
| # for local dev with operator-sdk), this runs bundle-hack/update_bundle.sh to | ||
| # patch digest-pinned image references into the CSV at build time. | ||
| FROM registry.access.redhat.com/ubi9/ubi-minimal:latest AS builder-runner | ||
| RUN microdnf install -y tar gzip && \ | ||
| curl -sL https://github.com/mikefarah/yq/releases/download/v4.44.1/yq_linux_amd64.tar.gz | tar xz && \ | ||
| mv yq_linux_amd64 /usr/bin/yq | ||
|
|
||
| FROM builder-runner AS builder | ||
| # Hack to set the operator container image in the deployment | ||
|
ma-hill marked this conversation as resolved.
|
||
| # Konflux nudges update these variables with the latest digest-pinned pullspecs. | ||
| ARG HYPERFLEET_OPERATOR_IMAGE_PULLSPEC="quay.io/redhat-services-prod/hyperfleet-tenant/hyperfleet/hyperfleet-operator@sha256:placeholder" | ||
| ENV HYPERFLEET_OPERATOR_IMAGE_PULLSPEC=${HYPERFLEET_OPERATOR_IMAGE_PULLSPEC} | ||
|
|
||
| ARG HYPERFLEET_API_IMAGE_PULLSPEC="quay.io/redhat-services-prod/hyperfleet-tenant/hyperfleet/hyperfleet-api@sha256:8533d0d875480f31f5112e454659a095a5d2e993c139a9045a06be6b67b829ca" | ||
| ENV HYPERFLEET_API_IMAGE_PULLSPEC=${HYPERFLEET_API_IMAGE_PULLSPEC} | ||
|
|
||
| COPY bundle-hack . | ||
| COPY bundle/manifests /manifests/ | ||
|
|
||
| RUN ./update_bundle.sh | ||
|
coderabbitai[bot] marked this conversation as resolved.
ma-hill marked this conversation as resolved.
|
||
|
|
||
| FROM scratch | ||
|
|
||
| # Core bundle labels. | ||
| LABEL operators.operatorframework.io.bundle.mediatype.v1=registry+v1 | ||
| LABEL operators.operatorframework.io.bundle.manifests.v1=manifests/ | ||
| LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/ | ||
| LABEL operators.operatorframework.io.bundle.package.v1=hyperfleet-operator | ||
| LABEL operators.operatorframework.io.bundle.channels.v1=stable | ||
| LABEL operators.operatorframework.io.bundle.channel.default.v1=stable | ||
| LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.42.3 | ||
| LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1 | ||
| LABEL operators.operatorframework.io.metrics.project_layout=go.kubebuilder.io/v4 | ||
|
|
||
| # Labels for testing. | ||
| LABEL operators.operatorframework.io.test.mediatype.v1=scorecard+v1 | ||
| LABEL operators.operatorframework.io.test.config.v1=tests/scorecard/ | ||
|
|
||
| # Copy patched manifests from builder, metadata and tests from source. | ||
| COPY --from=builder /manifests /manifests/ | ||
| COPY bundle/metadata /metadata/ | ||
| COPY bundle/tests/scorecard /tests/scorecard/ | ||
|
|
||
|
|
||
| ARG APP_VERSION="0.0.0-dev" | ||
| LABEL name="hyperfleet-operator-bundle" \ | ||
| vendor="Red Hat, Inc." \ | ||
| version="${APP_VERSION}" \ | ||
| summary="OLM bundle for the HyperFleet Operator" \ | ||
| description="OLM bundle for the HyperFleet Operator, which installs and manages HyperFleet." | ||
20 changes: 20 additions & 0 deletions
20
bundle/manifests/hyperfleet-operator-controller-manager-metrics-service_v1_service.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| apiVersion: v1 | ||
| kind: Service | ||
| metadata: | ||
| creationTimestamp: null | ||
| labels: | ||
| app.kubernetes.io/managed-by: kustomize | ||
| app.kubernetes.io/name: hyperfleet-operator | ||
| control-plane: controller-manager | ||
| name: hyperfleet-operator-controller-manager-metrics-service | ||
| spec: | ||
| ports: | ||
| - name: https | ||
| port: 8443 | ||
| protocol: TCP | ||
| targetPort: 8443 | ||
| selector: | ||
| app.kubernetes.io/name: hyperfleet-operator | ||
| control-plane: controller-manager | ||
| status: | ||
| loadBalancer: {} |
21 changes: 21 additions & 0 deletions
21
...rfleet-operator-hyperfleetconfig-admin-role_rbac.authorization.k8s.io_v1_clusterrole.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| apiVersion: rbac.authorization.k8s.io/v1 | ||
| kind: ClusterRole | ||
| metadata: | ||
| creationTimestamp: null | ||
| labels: | ||
| app.kubernetes.io/managed-by: kustomize | ||
| app.kubernetes.io/name: hyperfleet-operator | ||
| name: hyperfleet-operator-hyperfleetconfig-admin-role | ||
| rules: | ||
| - apiGroups: | ||
| - hyperfleet.redhat.com | ||
| resources: | ||
| - hyperfleetconfigs | ||
| verbs: | ||
| - '*' | ||
| - apiGroups: | ||
| - hyperfleet.redhat.com | ||
| resources: | ||
| - hyperfleetconfigs/status | ||
| verbs: | ||
| - get |
27 changes: 27 additions & 0 deletions
27
...fleet-operator-hyperfleetconfig-editor-role_rbac.authorization.k8s.io_v1_clusterrole.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| apiVersion: rbac.authorization.k8s.io/v1 | ||
| kind: ClusterRole | ||
| metadata: | ||
| creationTimestamp: null | ||
| labels: | ||
| app.kubernetes.io/managed-by: kustomize | ||
| app.kubernetes.io/name: hyperfleet-operator | ||
| name: hyperfleet-operator-hyperfleetconfig-editor-role | ||
| rules: | ||
| - apiGroups: | ||
| - hyperfleet.redhat.com | ||
| resources: | ||
| - hyperfleetconfigs | ||
| verbs: | ||
| - create | ||
| - delete | ||
| - get | ||
| - list | ||
| - patch | ||
| - update | ||
| - watch | ||
| - apiGroups: | ||
| - hyperfleet.redhat.com | ||
| resources: | ||
| - hyperfleetconfigs/status | ||
| verbs: | ||
| - get |
23 changes: 23 additions & 0 deletions
23
...fleet-operator-hyperfleetconfig-viewer-role_rbac.authorization.k8s.io_v1_clusterrole.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| apiVersion: rbac.authorization.k8s.io/v1 | ||
| kind: ClusterRole | ||
| metadata: | ||
| creationTimestamp: null | ||
| labels: | ||
| app.kubernetes.io/managed-by: kustomize | ||
| app.kubernetes.io/name: hyperfleet-operator | ||
| name: hyperfleet-operator-hyperfleetconfig-viewer-role | ||
| rules: | ||
| - apiGroups: | ||
| - hyperfleet.redhat.com | ||
| resources: | ||
| - hyperfleetconfigs | ||
| verbs: | ||
| - get | ||
| - list | ||
| - watch | ||
| - apiGroups: | ||
| - hyperfleet.redhat.com | ||
| resources: | ||
| - hyperfleetconfigs/status | ||
| verbs: | ||
| - get |
13 changes: 13 additions & 0 deletions
13
...anifests/hyperfleet-operator-metrics-reader_rbac.authorization.k8s.io_v1_clusterrole.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| apiVersion: rbac.authorization.k8s.io/v1 | ||
| kind: ClusterRole | ||
| metadata: | ||
| creationTimestamp: null | ||
| labels: | ||
| app.kubernetes.io/managed-by: kustomize | ||
| app.kubernetes.io/name: hyperfleet-operator | ||
| name: hyperfleet-operator-metrics-reader | ||
| rules: | ||
| - nonResourceURLs: | ||
| - /metrics | ||
| verbs: | ||
| - get |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.