diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 5f6e238..d35ab40 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -16,118 +16,108 @@ name: Validate PRs on: pull_request: - branches: [ main ] + branches: [main] jobs: go: name: Check go sources runs-on: ubuntu-latest steps: - - - name: Check out code into the Go module directory - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 - - - name: Set up Go 1.x - uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0 - with: - go-version-file: 'go.mod' - - - name: Cache go modules - id: cache-mod - uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2 - with: - path: ~/go/pkg/mod - key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} - restore-keys: | - ${{ runner.os }}-go- - - - name: Download dependencies - run: go mod download - if: steps.cache-mod.outputs.cache-hit != 'true' - - - name: Check go mod status - run: | - go mod tidy - if [[ ! -z $(git status -s) ]] - then - echo "Go mod state is not clean: $(git status -s)" - exit 1 - fi - - - name: Check format - run: | - go get -u github.com/google/addlicense - go install github.com/google/addlicense - go get -u golang.org/x/tools/cmd/goimports - go install golang.org/x/tools/cmd/goimports - git reset HEAD --hard + - name: Check out code into the Go module directory + uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - name: Set up Go 1.x + uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0 + with: + go-version-file: "go.mod" + - name: Cache go modules + id: cache-mod + uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2 + with: + path: ~/go/pkg/mod + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go- + - name: Download dependencies + run: go mod download + if: steps.cache-mod.outputs.cache-hit != 'true' + - name: Check go mod status + run: | + go mod tidy + if [[ ! -z $(git status -s) ]] + then + echo "Go mod state is not clean: $(git status -s)" + exit 1 + fi + - name: Check format + run: | + go get -u github.com/google/addlicense@dc31ac9ffcca99c9457226366135701794b128c0 + go install github.com/google/addlicense@dc31ac9ffcca99c9457226366135701794b128c0 + go get -u golang.org/x/tools/cmd/goimports@0cc407e63f5fdd71499c32afa4c54382c5b48d71 + go install golang.org/x/tools/cmd/goimports@0cc407e63f5fdd71499c32afa4c54382c5b48d71 + git reset HEAD --hard - make fmt - if [[ ! -z $(git status -s) ]] - then - echo "not well formatted sources found during make fmt: $(git --no-pager diff)" - exit 1 - fi + make fmt + if [[ ! -z $(git status -s) ]] + then + echo "not well formatted sources found during make fmt: $(git --no-pager diff)" + exit 1 + fi - make fmt_license - if [[ ! -z $(git status -s) ]] - then - echo "not well formatted sources found during make fmt_license: $(git status -s)" - exit 1 - fi - - - name: Check code generation - run: make generate - - - name: Check CRD manifest generation - run: make manifests - - - name: Run unit tests - run: make test - - - name: Upload coverage to Codecov - uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3.1.4 + make fmt_license + if [[ ! -z $(git status -s) ]] + then + echo "not well formatted sources found during make fmt_license: $(git status -s)" + exit 1 + fi + - name: Check code generation + run: make generate + - name: Check CRD manifest generation + run: make manifests + - name: Run unit tests + run: make test + - name: Upload coverage to Codecov + uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3.1.4 - - name: Run Gosec Security Scanner - run: | - go install github.com/securego/gosec/v2/cmd/gosec@v2.14.0 - make gosec - if [[ $? != 0 ]] - then - echo "gosec scanner failed to run " - exit 1 - fi + - name: Run Gosec Security Scanner + run: | + go install github.com/securego/gosec/v2/cmd/gosec@1af1d5bb49259b62e45c505db397dd2ada5d74f8 + make gosec + if [[ $? != 0 ]] + then + echo "gosec scanner failed to run " + exit 1 + fi - - name: Upload SARIF file - uses: github/codeql-action/upload-sarif@74483a38d39275f33fcff5f35b679b5ca4a26a99 # 2.22.5 - with: - # Path to SARIF file relative to the root of the repository - sarif_file: gosec.sarif + - name: Upload SARIF file + uses: github/codeql-action/upload-sarif@74483a38d39275f33fcff5f35b679b5ca4a26a99 # 2.22.5 + with: + # Path to SARIF file relative to the root of the repository + sarif_file: gosec.sarif operator-build: name: Check operator container image build runs-on: ubuntu-latest steps: - - name: Check out code into the Go module directory - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - name: Check out code into the Go module directory + uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 - - name: Set up QEMU # Enables arm64 image building - uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 #v3.0.0 + - name: Set up QEMU # Enables arm64 image building + uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 #v3.0.0 - - name: Check if operator docker build is working - run: make docker-buildx-build + - name: Check if operator docker build is working + run: make docker-buildx-build operator-bundle-build: name: Check operator bundle build runs-on: ubuntu-latest steps: - - name: Check out code into the Go module directory - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - name: Check out code into the Go module directory + uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 - - name: Set up QEMU # Enables arm64 image building - uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 #v3.0.0 - - - name: Build the operator's bundle image - run: make docker-bundle-buildx-build + - name: Set up QEMU # Enables arm64 image building + uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 #v3.0.0 + + - name: Build the operator's bundle image + run: make docker-bundle-buildx-build diff --git a/.github/workflows/dockerimage-push.yaml b/.github/workflows/dockerimage-push.yaml index fcbf1e9..574e64e 100644 --- a/.github/workflows/dockerimage-push.yaml +++ b/.github/workflows/dockerimage-push.yaml @@ -16,43 +16,43 @@ name: Next Dockerimage on: push: - branches: [ main ] + branches: [main] jobs: push-operator-image: runs-on: ubuntu-latest steps: - - name: Checkout registry-operator source code - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 - - - name: Set up QEMU # Enables arm64 image building - uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 #v3.0.0 - - - name: Login to Quay.io - uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc # v2.2.0 - with: - registry: quay.io - username: ${{ secrets.QUAY_USERNAME }} - password: ${{ secrets.QUAY_PASSWORD }} - - - name: Build and push Operator with Docker Buildx - run: "make docker-buildx-push" - + - name: Checkout registry-operator source code + uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + + - name: Set up QEMU # Enables arm64 image building + uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 #v3.0.0 + + - name: Login to Quay.io + uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc # v2.2.0 + with: + registry: quay.io + username: ${{ secrets.QUAY_USERNAME }} + password: ${{ secrets.QUAY_PASSWORD }} + + - name: Build and push Operator with Docker Buildx + run: "make docker-buildx-push" + push-operator-bundle: runs-on: ubuntu-latest steps: - - name: Checkout registry-operator source code - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - name: Checkout registry-operator source code + uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 - - name: Set up QEMU # Enables arm64 image building - uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 #v3.0.0 + - name: Set up QEMU # Enables arm64 image building + uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 #v3.0.0 - - name: Login to Quay.io - uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc # v2.2.0 - with: - registry: quay.io - username: ${{ secrets.QUAY_USERNAME }} - password: ${{ secrets.QUAY_PASSWORD }} + - name: Login to Quay.io + uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc # v2.2.0 + with: + registry: quay.io + username: ${{ secrets.QUAY_USERNAME }} + password: ${{ secrets.QUAY_PASSWORD }} - - name: Build and push bundle with Docker Buildx - run: "make docker-bundle-buildx-push" + - name: Build and push bundle with Docker Buildx + run: "make docker-bundle-buildx-push" diff --git a/.github/workflows/release-pr.yaml b/.github/workflows/release-pr.yaml index 4b264de..a2cfffd 100644 --- a/.github/workflows/release-pr.yaml +++ b/.github/workflows/release-pr.yaml @@ -31,7 +31,7 @@ jobs: go-version-file: 'go.mod' - name: Run Gosec Security Scanner run: | - go install github.com/securego/gosec/v2/cmd/gosec@v2.14.0 + go install github.com/securego/gosec/v2/cmd/gosec@1af1d5bb49259b62e45c505db397dd2ada5d74f8 make gosec if [[ $? != 0 ]] then diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b6ba854..55a7f8c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -15,6 +15,7 @@ contribution. See the [DCO](DCO) file for details. In order to show your agreement with the DCO you should include at the end of the commit message, the following line: + ```console Signed-off-by: Firstname Lastname ``` @@ -25,13 +26,14 @@ Once you set your user.name and user.email in your git config, you can sign your ### Issues -If you spot a problem with the **devfile registry operator**, [search if an issue already exists](https://github.com/devfile/api/issues?q=is%3Aissue+is%3Aopen+label%3Aarea%2Fregistry). +If you spot a problem with the **devfile registry operator**, [search if an issue already exists](https://github.com/devfile/api/issues?q=is%3Aissue+is%3Aopen+label%3Aarea%2Fregistry). If a related issue doesn't exist, you can open a new issue using a relevant [issue form](https://github.com/devfile/api/issues/new/choose). You can tag Devfile Registry Operator related issues with the `/area registry` text in your issue. ### Development #### First Time Setup + 1. Install prerequisites: see [Requirements section in README](README.md#requirements). 2. Fork and clone this repository. @@ -39,7 +41,9 @@ If a related issue doesn't exist, you can open a new issue using a relevant [iss 3. Open the folder in the IDE of your choice (VS Code with Go extension, or GoLand is recommended) #### Build and Run the Operator + The Makefile currently supports both Docker and Podman. To run the proper command replace `` with either `podman` or `docker` depending on your container engine. + 1. Log in to an OpenShift or Kubernetes cluster 2. Run `export IMG=` where `` is the image repository to where you would like to push the image (e.g. `quay.io/user/registry-operator:latest`). @@ -60,7 +64,7 @@ The Makefile currently supports both Docker and Podman. To run the proper comman By default, http/2 on the webhook server is disabled due to [CVE-2023-44487](https://github.com/advisories/GHSA-qppj-fm5r-hxr3). -If you want to enable http/2 for the webhook server, build with `ENABLE_WEBHOOK_HTTP2=true make -build` or with +If you want to enable http/2 for the webhook server, build with `ENABLE_WEBHOOK_HTTP2=true make -build` or with `ENABLE_WEBHOOK_HTTP2=true make run` if running locally. ##### Using other platforms @@ -124,8 +128,10 @@ You can use `make -build` to build your own image, `make -push` + In order for `make test-integration` to properly run you must first ensure your environment is prepared for the operator. The following steps should be done **before** running `make test-integration` and these commands should be run from the root of the repository where the [`Makefile`](Makefile) is located. + 1. Run `make install-cert` and wait for pods in the `cert-manager` namespace to be running before moving to step 2. 2. Run `make install && make deploy` and wait until pods in the `registry-operator-system` namespace are running before proceeding to step 3. 3. Run `make test-integration` or `IMG= make test-integration` to run the integration tests. @@ -133,6 +139,7 @@ these commands should be run from the root of the repository where the [`Makefil ### Submitting Pull Request **Note:** All commits must be signed off with the footer: + ``` Signed-off-by: First Lastname ``` diff --git a/VERSION b/VERSION index 446ba66..0d91a54 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.1.4 \ No newline at end of file +0.3.0 diff --git a/bundle.Dockerfile b/bundle.Dockerfile index 7521e07..97dd220 100644 --- a/bundle.Dockerfile +++ b/bundle.Dockerfile @@ -1,17 +1,3 @@ -# -# Copyright Red Hat -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. FROM scratch # Core bundle labels. @@ -20,7 +6,7 @@ LABEL operators.operatorframework.io.bundle.manifests.v1=manifests/ LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/ LABEL operators.operatorframework.io.bundle.package.v1=registry-operator LABEL operators.operatorframework.io.bundle.channels.v1=beta -LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.28.0 +LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.36.0 LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1 LABEL operators.operatorframework.io.metrics.project_layout=go.kubebuilder.io/v3 diff --git a/bundle/manifests/registry-operator.clusterserviceversion.yaml b/bundle/manifests/registry-operator.clusterserviceversion.yaml index 73fda74..67ae764 100644 --- a/bundle/manifests/registry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/registry-operator.clusterserviceversion.yaml @@ -49,25 +49,24 @@ metadata: ] capabilities: Basic Install categories: OpenShift Optional,Developer Tools - containerImage: quay.io/devfile/registry-operator:v0.1.4 - createdAt: "2024-02-27T22:36:03Z" + containerImage: quay.io/devfile/registry-operator:v0.3.0 + createdAt: "2024-08-20T09:11:27Z" description: Deploy and manage Devfile Registries on Kubernetes and OpenShift with the Devfile Registry operator. - operators.operatorframework.io/builder: operator-sdk-v1.28.0 + operators.operatorframework.io/builder: operator-sdk-v1.36.0 operators.operatorframework.io/project_layout: go.kubebuilder.io/v3 repository: https://github.com/devfile/registry-operator support: Red Hat - name: registry-operator.v0.1.4 + name: registry-operator.v0.3.0 namespace: placeholder spec: apiservicedefinitions: {} customresourcedefinitions: owned: - - description: ClusterDevfileRegistriesList is a custom resource where cluster - admins can add a list of Devfile Registries to allow devfiles to be visible - at the cluster level. In order to be added to the list, the Devfile Registries - must be reachable, supports the Devfile v2.0 spec and above, and is not using - the default namespace. + - description: |- + ClusterDevfileRegistriesList is a custom resource where cluster admins can add a list of Devfile Registries to allow devfiles to be visible + at the cluster level. In order to be added to the list, the Devfile Registries must be reachable, supports the Devfile v2.0 spec and above, + and is not using the default namespace. displayName: Cluster Devfile Registries List kind: ClusterDevfileRegistriesList name: clusterdevfileregistrieslists.registry.devfile.io @@ -95,10 +94,10 @@ spec: displayName: Conditions path: conditions version: v1alpha1 - - description: DevfileRegistry is a custom resource allows you to create and manage - your own index server and registry viewer. In order to be added, the Devfile - Registry must be reachable, supports the Devfile v2.0 spec and above, and - is not using the default namespace. + - description: |- + DevfileRegistry is a custom resource allows you to create and manage your own index server and registry viewer. + In order to be added, the Devfile Registry must be reachable, supports the Devfile v2.0 spec and above, and is + not using the default namespace. displayName: Devfile Registry kind: DevfileRegistry name: devfileregistries.registry.devfile.io @@ -117,19 +116,35 @@ spec: - description: Sets the image pull policy for the container displayName: Image Pull Policy path: devfileIndex.imagePullPolicy + - description: Sets the memory limit for the container + displayName: Memory Limit + path: devfileIndex.memoryLimit - description: Sets the container image containing devfile stacks to be deployed on the Devfile Registry displayName: Devfile Index Image path: devfileIndexImage + - description: Overrides the fully qualified app name of the devfile registry + displayName: Fullname Override + path: fullnameOverride - description: Sets the registry server deployment to run under headless mode displayName: Headless path: headless + - description: Overrides the entire hostname and domain of the devfile registry + ingress + displayName: Hostname Override + path: hostnameOverride - displayName: K8s path: k8s + - description: Ingress class for a Kubernetes cluster. Defaults to nginx. + displayName: Ingress Class + path: k8s.ingressClass - description: Ingress domain for a Kubernetes cluster. This MUST be explicitly specified on Kubernetes. There are no defaults displayName: Ingress Domain path: k8s.ingressDomain + - description: Overrides the app name of the devfile registry + displayName: Name Override + path: nameOverride - description: Sets the OCI registry container spec to be deployed on the Devfile Registry displayName: Oci Registry @@ -140,8 +155,12 @@ spec: - description: Sets the image pull policy for the container displayName: Image Pull Policy path: ociRegistry.imagePullPolicy - - description: Overrides the container image used for the OCI registry. Recommended - to leave blank and default to the image specified by the operator. + - description: Sets the memory limit for the container + displayName: Memory Limit + path: ociRegistry.memoryLimit + - description: |- + Overrides the container image used for the OCI registry. + Recommended to leave blank and default to the image specified by the operator. displayName: Oci Registry Image path: ociRegistryImage - description: Sets the registry viewer container spec to be deployed on the @@ -154,41 +173,45 @@ spec: - description: Sets the image pull policy for the container displayName: Image Pull Policy path: registryViewer.imagePullPolicy + - description: Sets the memory limit for the container + displayName: Memory Limit + path: registryViewer.memoryLimit - description: Overrides the container image used for the registry viewer. displayName: Registry Viewer Image path: registryViewerImage - displayName: Storage path: storage - - description: Instructs the operator to deploy the DevfileRegistry with persistent - storage Disabled by default. + - description: |- + Instructs the operator to deploy the DevfileRegistry with persistent storage + Disabled by default. displayName: Enabled path: storage.enabled - - description: Configures the size of the devfile registry's persistent volume, - if enabled. Defaults to 1Gi. + - description: |- + Configures the size of the devfile registry's persistent volume, if enabled. + Defaults to 1Gi. displayName: Registry Volume Size path: storage.registryVolumeSize - displayName: Telemetry path: telemetry - - description: Specify a telemetry key to allow devfile specific data to be - sent to a client's own Segment analytics source. If the write key is specified - then telemetry will be enabled + - description: |- + Specify a telemetry key to allow devfile specific data to be sent to a client's own Segment analytics source. + If the write key is specified then telemetry will be enabled displayName: Key path: telemetry.key - description: The registry name (can be any string) that is used as identifier for devfile telemetry. displayName: Registry Name path: telemetry.registryName - - description: Specify a telemetry write key for the registry viewer component - to allow data to be sent to a client's own Segment analytics source. If - the write key is specified then telemetry for the registry viewer component - will be enabled + - description: |- + Specify a telemetry write key for the registry viewer component to allow data to be sent to a client's own Segment analytics source. + If the write key is specified then telemetry for the registry viewer component will be enabled displayName: Registry Viewer Write Key path: telemetry.registryViewerWriteKey - displayName: TLS path: tls - - description: Instructs the operator to deploy the DevfileRegistry with TLS - enabled. Enabled by default. Disabling is only recommended for development - or test. + - description: |- + Instructs the operator to deploy the DevfileRegistry with TLS enabled. + Enabled by default. Disabling is only recommended for development or test. displayName: Enabled path: tls.enabled - description: Name of an optional, pre-existing TLS secret to use for TLS termination @@ -204,11 +227,10 @@ spec: displayName: URL path: url version: v1alpha1 - - description: DevfileRegistriesList is a custom resource where namespace users - can add a list of Devfile Registries to allow devfiles to be visible at the - namespace level. In order to be added to the list, the Devfile Registries - must be reachable, supports the Devfile v2.0 spec and above, and is not using - the default namespace. + - description: |- + DevfileRegistriesList is a custom resource where namespace users can add a list of Devfile Registries to allow devfiles to be visible + at the namespace level. In order to be added to the list, the Devfile Registries must be reachable, supports the Devfile v2.0 spec + and above, and is not using the default namespace. displayName: Devfile Registries List kind: DevfileRegistriesList name: devfileregistrieslists.registry.devfile.io @@ -448,7 +470,7 @@ spec: - --leader-elect command: - /manager - image: quay.io/devfile/registry-operator:next + image: quay.io/devfile/registry-operator:v0.3.0 imagePullPolicy: Always livenessProbe: httpGet: @@ -571,7 +593,7 @@ spec: provider: name: Red Hat url: https://redhat.com - version: 0.1.4 + version: 0.3.0 webhookdefinitions: - admissionReviewVersions: - v1 diff --git a/bundle/manifests/registry.devfile.io_devfileregistries.yaml b/bundle/manifests/registry.devfile.io_devfileregistries.yaml index effbb22..1a81267 100644 --- a/bundle/manifests/registry.devfile.io_devfileregistries.yaml +++ b/bundle/manifests/registry.devfile.io_devfileregistries.yaml @@ -55,24 +55,42 @@ spec: imagePullPolicy: description: Sets the image pull policy for the container type: string + memoryLimit: + description: Sets the memory limit for the container + type: string type: object devfileIndexImage: description: Sets the container image containing devfile stacks to be deployed on the Devfile Registry type: string + fullnameOverride: + description: Overrides the fully qualified app name of the devfile + registry + type: string headless: description: Sets the registry server deployment to run under headless mode type: boolean + hostnameOverride: + description: Overrides the entire hostname and domain of the devfile + registry ingress + type: string k8s: description: DevfileRegistrySpecK8sOnly defines the desired state of the kubernetes-only fields of the DevfileRegistry properties: + ingressClass: + description: Ingress class for a Kubernetes cluster. Defaults + to nginx. + type: string ingressDomain: description: Ingress domain for a Kubernetes cluster. This MUST be explicitly specified on Kubernetes. There are no defaults type: string type: object + nameOverride: + description: Overrides the app name of the devfile registry + type: string ociRegistry: description: Sets the OCI registry container spec to be deployed on the Devfile Registry @@ -83,6 +101,9 @@ spec: imagePullPolicy: description: Sets the image pull policy for the container type: string + memoryLimit: + description: Sets the memory limit for the container + type: string type: object ociRegistryImage: description: Overrides the container image used for the OCI registry. @@ -99,6 +120,9 @@ spec: imagePullPolicy: description: Sets the image pull policy for the container type: string + memoryLimit: + description: Sets the memory limit for the container + type: string type: object registryViewerImage: description: Overrides the container image used for the registry viewer. diff --git a/bundle/metadata/annotations.yaml b/bundle/metadata/annotations.yaml index 143ee2f..ca8dbd5 100644 --- a/bundle/metadata/annotations.yaml +++ b/bundle/metadata/annotations.yaml @@ -5,7 +5,7 @@ annotations: operators.operatorframework.io.bundle.metadata.v1: metadata/ operators.operatorframework.io.bundle.package.v1: registry-operator operators.operatorframework.io.bundle.channels.v1: beta - operators.operatorframework.io.metrics.builder: operator-sdk-v1.28.0 + operators.operatorframework.io.metrics.builder: operator-sdk-v1.36.0 operators.operatorframework.io.metrics.mediatype.v1: metrics+v1 operators.operatorframework.io.metrics.project_layout: go.kubebuilder.io/v3 diff --git a/config/manager/kustomization.yaml b/config/manager/kustomization.yaml index 9d4f89b..82b2de5 100644 --- a/config/manager/kustomization.yaml +++ b/config/manager/kustomization.yaml @@ -15,4 +15,4 @@ kind: Kustomization images: - name: controller newName: quay.io/devfile/registry-operator - newTag: next + newTag: v0.3.0 diff --git a/config/manifests/bases/registry-operator.clusterserviceversion.yaml b/config/manifests/bases/registry-operator.clusterserviceversion.yaml index 0ac381e..942b60f 100644 --- a/config/manifests/bases/registry-operator.clusterserviceversion.yaml +++ b/config/manifests/bases/registry-operator.clusterserviceversion.yaml @@ -49,23 +49,22 @@ metadata: ] capabilities: Basic Install categories: OpenShift Optional,Developer Tools - containerImage: quay.io/devfile/registry-operator:v0.1.4 + containerImage: quay.io/devfile/registry-operator:v0.3.0 createdAt: "2023-09-06T19:45:06Z" description: Deploy and manage Devfile Registries on Kubernetes and OpenShift with the Devfile Registry operator. repository: https://github.com/devfile/registry-operator support: Red Hat - name: registry-operator.v0.1.4 + name: registry-operator.v0.3.0 namespace: placeholder spec: apiservicedefinitions: {} customresourcedefinitions: owned: - - description: ClusterDevfileRegistriesList is a custom resource where cluster - admins can add a list of Devfile Registries to allow devfiles to be visible - at the cluster level. In order to be added to the list, the Devfile Registries - must be reachable, supports the Devfile v2.0 spec and above, and is not using - the default namespace. + - description: |- + ClusterDevfileRegistriesList is a custom resource where cluster admins can add a list of Devfile Registries to allow devfiles to be visible + at the cluster level. In order to be added to the list, the Devfile Registries must be reachable, supports the Devfile v2.0 spec and above, + and is not using the default namespace. displayName: Cluster Devfile Registries List kind: ClusterDevfileRegistriesList name: clusterdevfileregistrieslists.registry.devfile.io @@ -93,10 +92,10 @@ spec: displayName: Conditions path: conditions version: v1alpha1 - - description: DevfileRegistry is a custom resource allows you to create and manage - your own index server and registry viewer. In order to be added, the Devfile - Registry must be reachable, supports the Devfile v2.0 spec and above, and - is not using the default namespace. + - description: |- + DevfileRegistry is a custom resource allows you to create and manage your own index server and registry viewer. + In order to be added, the Devfile Registry must be reachable, supports the Devfile v2.0 spec and above, and is + not using the default namespace. displayName: Devfile Registry kind: DevfileRegistry name: devfileregistries.registry.devfile.io @@ -115,19 +114,35 @@ spec: - description: Sets the image pull policy for the container displayName: Image Pull Policy path: devfileIndex.imagePullPolicy + - description: Sets the memory limit for the container + displayName: Memory Limit + path: devfileIndex.memoryLimit - description: Sets the container image containing devfile stacks to be deployed on the Devfile Registry displayName: Devfile Index Image path: devfileIndexImage + - description: Overrides the fully qualified app name of the devfile registry + displayName: Fullname Override + path: fullnameOverride - description: Sets the registry server deployment to run under headless mode displayName: Headless path: headless + - description: Overrides the entire hostname and domain of the devfile registry + ingress + displayName: Hostname Override + path: hostnameOverride - displayName: K8s path: k8s + - description: Ingress class for a Kubernetes cluster. Defaults to nginx. + displayName: Ingress Class + path: k8s.ingressClass - description: Ingress domain for a Kubernetes cluster. This MUST be explicitly specified on Kubernetes. There are no defaults displayName: Ingress Domain path: k8s.ingressDomain + - description: Overrides the app name of the devfile registry + displayName: Name Override + path: nameOverride - description: Sets the OCI registry container spec to be deployed on the Devfile Registry displayName: Oci Registry @@ -138,8 +153,12 @@ spec: - description: Sets the image pull policy for the container displayName: Image Pull Policy path: ociRegistry.imagePullPolicy - - description: Overrides the container image used for the OCI registry. Recommended - to leave blank and default to the image specified by the operator. + - description: Sets the memory limit for the container + displayName: Memory Limit + path: ociRegistry.memoryLimit + - description: |- + Overrides the container image used for the OCI registry. + Recommended to leave blank and default to the image specified by the operator. displayName: Oci Registry Image path: ociRegistryImage - description: Sets the registry viewer container spec to be deployed on the @@ -152,41 +171,45 @@ spec: - description: Sets the image pull policy for the container displayName: Image Pull Policy path: registryViewer.imagePullPolicy + - description: Sets the memory limit for the container + displayName: Memory Limit + path: registryViewer.memoryLimit - description: Overrides the container image used for the registry viewer. displayName: Registry Viewer Image path: registryViewerImage - displayName: Storage path: storage - - description: Instructs the operator to deploy the DevfileRegistry with persistent - storage Disabled by default. + - description: |- + Instructs the operator to deploy the DevfileRegistry with persistent storage + Disabled by default. displayName: Enabled path: storage.enabled - - description: Configures the size of the devfile registry's persistent volume, - if enabled. Defaults to 1Gi. + - description: |- + Configures the size of the devfile registry's persistent volume, if enabled. + Defaults to 1Gi. displayName: Registry Volume Size path: storage.registryVolumeSize - displayName: Telemetry path: telemetry - - description: Specify a telemetry key to allow devfile specific data to be - sent to a client's own Segment analytics source. If the write key is specified - then telemetry will be enabled + - description: |- + Specify a telemetry key to allow devfile specific data to be sent to a client's own Segment analytics source. + If the write key is specified then telemetry will be enabled displayName: Key path: telemetry.key - description: The registry name (can be any string) that is used as identifier for devfile telemetry. displayName: Registry Name path: telemetry.registryName - - description: Specify a telemetry write key for the registry viewer component - to allow data to be sent to a client's own Segment analytics source. If - the write key is specified then telemetry for the registry viewer component - will be enabled + - description: |- + Specify a telemetry write key for the registry viewer component to allow data to be sent to a client's own Segment analytics source. + If the write key is specified then telemetry for the registry viewer component will be enabled displayName: Registry Viewer Write Key path: telemetry.registryViewerWriteKey - displayName: TLS path: tls - - description: Instructs the operator to deploy the DevfileRegistry with TLS - enabled. Enabled by default. Disabling is only recommended for development - or test. + - description: |- + Instructs the operator to deploy the DevfileRegistry with TLS enabled. + Enabled by default. Disabling is only recommended for development or test. displayName: Enabled path: tls.enabled - description: Name of an optional, pre-existing TLS secret to use for TLS termination @@ -202,11 +225,10 @@ spec: displayName: URL path: url version: v1alpha1 - - description: DevfileRegistriesList is a custom resource where namespace users - can add a list of Devfile Registries to allow devfiles to be visible at the - namespace level. In order to be added to the list, the Devfile Registries - must be reachable, supports the Devfile v2.0 spec and above, and is not using - the default namespace. + - description: |- + DevfileRegistriesList is a custom resource where namespace users can add a list of Devfile Registries to allow devfiles to be visible + at the namespace level. In order to be added to the list, the Devfile Registries must be reachable, supports the Devfile v2.0 spec + and above, and is not using the default namespace. displayName: Devfile Registries List kind: DevfileRegistriesList name: devfileregistrieslists.registry.devfile.io @@ -291,4 +313,4 @@ spec: provider: name: Red Hat url: https://redhat.com - version: 0.1.4 + version: 0.3.0