From 8a00c607a63b7d592e55d71afc24882087a01881 Mon Sep 17 00:00:00 2001 From: phantomjinx Date: Mon, 13 Nov 2023 16:03:04 +0000 Subject: [PATCH] Adds improvements to bundle generation --- Makefile | 60 +++- bundle.Dockerfile | 5 +- ...hawtio-operator.clusterserviceversion.yaml | 4 +- bundle/kustomization.yaml | 7 +- bundle/manifests/hawt.io_hawtios.yaml | 332 +++++++++++++++++- ...hawtio-operator.clusterserviceversion.yaml | 24 +- bundle/metadata/annotations.yaml | 5 +- bundle/scorecard/.vfsignore | 18 + bundle/scorecard/bases/config.yaml | 24 ++ bundle/scorecard/kustomization.yaml | 33 ++ bundle/scorecard/patches/basic.config.yaml | 27 ++ bundle/scorecard/patches/olm.config.yaml | 37 ++ bundle/tests/scorecard/config.yaml | 40 +++ 13 files changed, 590 insertions(+), 26 deletions(-) create mode 100644 bundle/scorecard/.vfsignore create mode 100644 bundle/scorecard/bases/config.yaml create mode 100644 bundle/scorecard/kustomization.yaml create mode 100644 bundle/scorecard/patches/basic.config.yaml create mode 100644 bundle/scorecard/patches/olm.config.yaml create mode 100644 bundle/tests/scorecard/config.yaml diff --git a/Makefile b/Makefile index 2db825c0d5..00d7a82198 100644 --- a/Makefile +++ b/Makefile @@ -5,10 +5,12 @@ DEFAULT_IMAGE := docker.io/${ORG}/${PROJECT} IMAGE ?= $(DEFAULT_IMAGE) DEFAULT_TAG := latest TAG ?= $(DEFAULT_TAG) -VERSION ?= 0.5.0 +VERSION ?= 1.0.0 HAWTIO_ONLINE_VERSION ?= latest HAWTIO_ONLINE_IMAGE_NAME ?= docker.io/${ORG}/hawtio DEBUG ?= false +LAST_RELEASED_IMAGE_NAME := hawtio-operator +LAST_RELEASED_VERSION ?= 0.5.0 # # Versions of tools and binaries @@ -108,8 +110,56 @@ endif # Generate bundle manifests and metadata -bundle: kustomize operator-sdk - $(KUSTOMIZE) build bundle | $(OPERATOR_SDK) generate bundle --kustomize-dir bundle --version $(VERSION) +DEFAULT_CHANNEL ?= $(shell echo "stable-v$(word 1,$(subst ., ,$(lastword $(VERSION))))") +CHANNELS ?= $(DEFAULT_CHANNEL),latest +PACKAGE := hawtio-operator +MANIFESTS := bundle +CSV_VERSION := $(VERSION) +CSV_NAME := $(PACKAGE).v$(CSV_VERSION) +CSV_DISPLAY_NAME := Hawtio Operator +CSV_FILENAME := $(PACKAGE).clusterserviceversion.yaml +CSV_PATH := $(MANIFESTS)/bases/$(CSV_FILENAME) +CSV_REPLACES := $(LAST_RELEASED_IMAGE_NAME).v$(LAST_RELEASED_VERSION) +IMAGE_NAME ?= docker.io/hawtio/operator + +# Options for 'bundle-build' +ifneq ($(origin CHANNELS), undefined) +BUNDLE_CHANNELS := --channels=$(CHANNELS) +endif +ifneq ($(origin DEFAULT_CHANNEL), undefined) +BUNDLE_DEFAULT_CHANNEL := --default-channel=$(DEFAULT_CHANNEL) +endif +ifneq ($(origin PACKAGE), undefined) +BUNDLE_PACKAGE := --package=$(PACKAGE) +endif +BUNDLE_METADATA_OPTS ?= $(BUNDLE_CHANNELS) $(BUNDLE_DEFAULT_CHANNEL) $(BUNDLE_PACKAGE) + +# +# Tailor the manifest according to default values for this project +# Note. to successfully make the bundle the name must match that specified in the PROJECT file +# +pre-bundle: + # bundle name must match that which appears in PROJECT file + @sed -i 's/projectName: .*/projectName: $(PACKAGE)/' PROJECT + @sed -i 's~^ containerImage: .*~ containerImage: $(IMAGE):$(VERSION)~' $(CSV_PATH) + @sed -i 's/^ name: .*.\(v.*\)/ name: $(CSV_NAME)/' $(CSV_PATH) + @sed -i 's/^ displayName: .*/ displayName: $(CSV_DISPLAY_NAME)/' $(CSV_PATH) + @sed -i 's/^ version: .*/ version: $(CSV_VERSION)/' $(CSV_PATH) + @if grep -q replaces $(CSV_PATH); \ + then sed -i 's/^ replaces: .*/ replaces: $(CSV_REPLACES)/' $(CSV_PATH); \ + else sed -i '/ version: ${CSV_VERSION}/a \ \ replaces: $(CSV_REPLACES)' $(CSV_PATH); \ + fi + +bundle: kustomize operator-sdk pre-bundle + @# Display BUNDLE_METADATA_OPTS for debugging + $(info BUNDLE_METADATA_OPTS=$(BUNDLE_METADATA_OPTS)) + @# Sets the operator image to the preferred image:tag + @cd bundle && $(KUSTOMIZE) edit set image $(IMAGE_NAME)=$(IMAGE):$(VERSION) + @# Build kustomize manifests + $(KUSTOMIZE) build bundle | $(OPERATOR_SDK) generate bundle \ + --kustomize-dir bundle \ + --version $(VERSION) -q --overwrite \ + $(BUNDLE_METADATA_OPTS) validate-bundle: operator-sdk $(OPERATOR_SDK) bundle validate ./bundle --select-optional suite=operatorframework @@ -146,12 +196,12 @@ endif operator-sdk: detect-os @echo "####### Installing operator-sdk version $(OPERATOR_SDK_VERSION)..." - curl \ + @curl \ -s -L https://github.com/operator-framework/operator-sdk/releases/download/$(OPERATOR_SDK_VERSION)/operator-sdk_$(OS_LOWER)_amd64 \ -o operator-sdk ; \ chmod +x operator-sdk ;\ mkdir -p $(GOBIN) ;\ - mv operator-sdk $(GOBIN)/ ; + mv operator-sdk $(GOBIN)/ ; OPERATOR_SDK=$(GOBIN)/operator-sdk # diff --git a/bundle.Dockerfile b/bundle.Dockerfile index 582958d699..f3917315ae 100644 --- a/bundle.Dockerfile +++ b/bundle.Dockerfile @@ -5,8 +5,9 @@ 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=hawtio-operator -LABEL operators.operatorframework.io.bundle.channels.v1=alpha -LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.11.0+git +LABEL operators.operatorframework.io.bundle.channels.v1=stable-v1,latest +LABEL operators.operatorframework.io.bundle.channel.default.v1=stable-v1 +LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.28.0 LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1 LABEL operators.operatorframework.io.metrics.project_layout=go.kubebuilder.io/v2 diff --git a/bundle/bases/hawtio-operator.clusterserviceversion.yaml b/bundle/bases/hawtio-operator.clusterserviceversion.yaml index 855aa9126e..8b950eedc4 100644 --- a/bundle/bases/hawtio-operator.clusterserviceversion.yaml +++ b/bundle/bases/hawtio-operator.clusterserviceversion.yaml @@ -6,9 +6,10 @@ metadata: categories: Integration & Delivery certified: "false" description: Hawtio eases the discovery and management of Java applications deployed on OpenShift. - containerImage: docker.io/hawtio/operator + containerImage: docker.io/hawtio/operator:1.0.0 repository: https://github.com/hawtio/hawtio-operator support: Red Hat + name: hawtio-operator.v1.0.0 spec: displayName: Hawtio Operator maintainers: @@ -66,3 +67,4 @@ spec: type: MultiNamespace - supported: false type: AllNamespaces + replaces: hawtio-operator.v0.5.0 diff --git a/bundle/kustomization.yaml b/bundle/kustomization.yaml index 3381bf8197..56893a4d72 100644 --- a/bundle/kustomization.yaml +++ b/bundle/kustomization.yaml @@ -2,6 +2,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: - - ../deploy/crd - - ../deploy/crs - - ../deploy +- ../deploy/crd +- ../deploy/crs +- ../deploy +- scorecard diff --git a/bundle/manifests/hawt.io_hawtios.yaml b/bundle/manifests/hawt.io_hawtios.yaml index bfacb9e0d6..ed0989cbda 100644 --- a/bundle/manifests/hawt.io_hawtios.yaml +++ b/bundle/manifests/hawt.io_hawtios.yaml @@ -3,6 +3,7 @@ kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.6.1 + creationTimestamp: null name: hawtios.hawt.io spec: group: hawt.io @@ -13,9 +14,330 @@ spec: listKind: HawtioList plural: hawtios singular: hawtio - preserveUnknownFields: false scope: Namespaced versions: + - additionalPrinterColumns: + - description: Creation phase + jsonPath: .metadata.creationTimestamp + name: Age + type: date + - description: Console image + jsonPath: .status.image + name: Image + type: string + - description: Console phase + jsonPath: .status.phase + name: Phase + type: string + - description: Console URL + jsonPath: .status.URL + name: URL + type: string + name: v1 + schema: + openAPIV3Schema: + description: Hawtio is the Schema for the Hawtio Console API. + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: Defines the desired state of Hawtio + properties: + auth: + description: The authentication configuration + properties: + clientCertCheckSchedule: + description: CronJob schedule that defines how often the expiry + of the certificate will be checked. Client rotation isn't enabled + if the schedule isn't set. + type: string + clientCertCommonName: + description: The generated client certificate CN + type: string + clientCertExpirationDate: + description: The generated client certificate expiration date + format: date-time + type: string + clientCertExpirationPeriod: + description: The duration in hours before the expiration date, + during which the certification can be rotated. The default is + set to 24 hours. + type: integer + type: object + config: + description: The Hawtio console configuration + properties: + about: + description: The information to be displayed in the About page + properties: + additionalInfo: + description: The text for the description section + type: string + copyright: + description: The text for the copyright section + type: string + imgSrc: + description: The image displayed in the page. It can be a + path, relative to the Hawtio status URL, or an absolute + URL. + type: string + productInfo: + description: List of product information + items: + description: The product information displayed in the About + page + properties: + name: + description: The name of the product information + type: string + value: + description: The value of the product information + type: string + required: + - name + - value + type: object + type: array + title: + description: The title of the page + type: string + type: object + branding: + description: The UI branding + properties: + appLogoUrl: + description: The URL of the logo, that displays in the navigation + bar. It can be a path, relative to the Hawtio status URL, + or an absolute URL. + type: string + appName: + description: The application title, that usually displays + in the Web browser tab. + type: string + css: + description: The URL of an external CSS stylesheet, that can + be used to style the application. It can be a path, relative + to the Hawtio status URL, or an absolute URL. + type: string + favicon: + description: The URL of the favicon, that usually displays + in the Web browser tab. It can be a path, relative to the + Hawtio status URL, or an absolute URL. + type: string + type: object + disabledRoutes: + description: Disables UI components with matching routes + items: + type: string + type: array + online: + description: The OpenShift related configuration + properties: + consoleLink: + description: The configuration for the OpenShift Web console + link. A link is added to the application menu when the Hawtio + deployment is equal to 'cluster'. Otherwise, a link is added + to the Hawtio project dashboard. + properties: + imageRelativePath: + description: The path, relative to the Hawtio status URL, + for the icon used in front of the link in the application + menu. It is only applicable when the Hawtio deployment + type is equal to 'cluster'. The image should be square + and will be shown at 24x24 pixels. + type: string + section: + description: The section of the application menu in which + the link should appear. It is only applicable when the + Hawtio deployment type is equal to 'cluster'. + type: string + text: + description: The text display for the link + type: string + type: object + projectSelector: + description: The selector used to watch for projects. It is + only applicable when the Hawtio deployment type is equal + to 'cluster'. By default, all the projects the logged in + user has access to are watched. The string representation + of the selector must be provided, as mandated by the `--selector`, + or `-l`, options from the `kubectl get` command. See https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ + type: string + type: object + type: object + externalRoutes: + description: List of external route names that will be annotated by + the operator to access the console using the routes + items: + type: string + type: array + metadataPropagation: + description: The configuration for which metadata on Hawtio custom + resources to propagate to generated resources such as deployments, + pods, services, and routes. + properties: + annotations: + description: Annotations to propagate + items: + type: string + type: array + labels: + description: Labels to propagate + items: + type: string + type: array + type: object + nginx: + description: The Nginx runtime configuration + properties: + clientBodyBufferSize: + description: The buffer size for reading client request body. + Defaults to `256k`. + type: string + proxyBuffers: + description: The number and size of the buffers used for reading + a response from the proxied server, for a single connection. + Defaults to `16 128k`. + type: string + subrequestOutputBufferSize: + description: The size of the buffer used for storing the response + body of a subrequest. Defaults to `10m`. + type: string + type: object + rbac: + description: The RBAC configuration + properties: + configMap: + description: The name of the ConfigMap that contains the ACL definition. + type: string + disableRBACRegistry: + description: Disable performance improvement brought by RBACRegistry + and revert to the classic behavior. Defaults to `false`. + type: boolean + type: object + replicas: + description: Number of desired pods. This is a pointer to distinguish + between explicit zero and not specified. Defaults to 1. + format: int32 + type: integer + resources: + description: The Hawtio console compute resources + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Limits describes the maximum amount of compute resources + allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Requests describes the minimum amount of compute + resources required. If Requests is omitted for a container, + it defaults to Limits if that is explicitly specified, otherwise + to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + type: object + type: object + route: + description: Custom certificate configuration for the route + properties: + caCert: + description: Ca certificate secret key selector + properties: + key: + description: The key of the secret to select from. Must be + a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the Secret or its key must be + defined + type: boolean + required: + - key + type: object + certSecret: + description: Name of the TLS secret with the custom certificate + used for the route TLS termination + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + type: object + routeHostName: + description: 'The edge host name of the route that exposes the Hawtio + service externally. If not specified, it is automatically generated + and is of the form: [-]. where + is the default routing sub-domain as configured for the cluster. + Note that the operator will recreate the route if the field is emptied, + so that the host is re-generated.' + type: string + type: + description: 'The deployment type. Defaults to cluster. cluster: Hawtio + is capable of discovering and managing applications across all namespaces + the authenticated user has access to. namespace: Hawtio is capable + of discovering and managing applications within the deployment namespace.' + enum: + - Cluster + - Namespace + type: string + type: object + status: + description: Reports the observed state of Hawtio + properties: + URL: + description: The Hawtio console route URL + type: string + image: + description: The Hawtio console container image + type: string + phase: + description: The Hawtio deployment phase + enum: + - Initialized + - Deployed + - Failed + type: string + replicas: + description: The actual number of pods + format: int32 + type: integer + selector: + description: The label selector for the Hawtio pods + type: string + type: object + type: object + served: true + storage: true + subresources: + scale: + labelSelectorPath: .status.selector + specReplicasPath: .spec.replicas + statusReplicasPath: .status.replicas + status: {} - additionalPrinterColumns: - description: Creation phase jsonPath: .metadata.creationTimestamp @@ -335,10 +657,16 @@ spec: type: object type: object served: true - storage: true + storage: false subresources: scale: labelSelectorPath: .status.selector specReplicasPath: .spec.replicas statusReplicasPath: .status.replicas status: {} +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] diff --git a/bundle/manifests/hawtio-operator.clusterserviceversion.yaml b/bundle/manifests/hawtio-operator.clusterserviceversion.yaml index fb9b0a37b0..f538b532e0 100644 --- a/bundle/manifests/hawtio-operator.clusterserviceversion.yaml +++ b/bundle/manifests/hawtio-operator.clusterserviceversion.yaml @@ -5,7 +5,7 @@ metadata: alm-examples: |- [ { - "apiVersion": "hawt.io/v1alpha1", + "apiVersion": "hawt.io/v1", "kind": "Hawtio", "metadata": { "name": "hawtio-online" @@ -16,7 +16,6 @@ metadata: "clientCertExpirationPeriod": 24 }, "replicas": 1, - "version": "1.14.0", "resources": { "limits": { "cpu": "1", @@ -34,18 +33,22 @@ metadata: capabilities: Seamless Upgrades categories: Integration & Delivery certified: "false" - containerImage: docker.io/hawtio/operator:0.5.0 - createdAt: "2022-04-08T00:00:00Z" - description: Hawtio eases the discovery and management of Java applications deployed on OpenShift. - operators.operatorframework.io/builder: operator-sdk-v1.11.0+git + containerImage: docker.io/hawtio/operator:1.0.0 + createdAt: "2023-11-13T16:00:10Z" + description: Hawtio eases the discovery and management of Java applications deployed + on OpenShift. + operators.operatorframework.io/builder: operator-sdk-v1.28.0 operators.operatorframework.io/project_layout: go.kubebuilder.io/v2 repository: https://github.com/hawtio/hawtio-operator support: Red Hat - name: hawtio-operator.v0.5.0 + name: hawtio-operator.v1.0.0 spec: apiservicedefinitions: {} customresourcedefinitions: owned: + - kind: Hawtio + name: hawtios.hawt.io + version: v1 - description: A Hawtio Console displayName: Hawtio kind: Hawtio @@ -150,7 +153,7 @@ spec: fieldPath: metadata.name - name: OPERATOR_NAME value: hawtio-operator - image: docker.io/hawtio/operator:0.5.0 + image: docker.io/hawtio/operator:1.0.0 imagePullPolicy: Always name: hawtio-operator ports: @@ -264,8 +267,7 @@ spec: - email: hawtio@googlegroups.com name: The Hawtio team maturity: alpha - minKubeVersion: 1.19.0 provider: name: Red Hat - replaces: hawtio-operator.v0.4.0 - version: 0.5.0 + replaces: hawtio-operator.v0.5.0 + version: 1.0.0 diff --git a/bundle/metadata/annotations.yaml b/bundle/metadata/annotations.yaml index a34637e684..64f8704c76 100644 --- a/bundle/metadata/annotations.yaml +++ b/bundle/metadata/annotations.yaml @@ -4,8 +4,9 @@ annotations: operators.operatorframework.io.bundle.manifests.v1: manifests/ operators.operatorframework.io.bundle.metadata.v1: metadata/ operators.operatorframework.io.bundle.package.v1: hawtio-operator - operators.operatorframework.io.bundle.channels.v1: alpha - operators.operatorframework.io.metrics.builder: operator-sdk-v1.11.0+git + operators.operatorframework.io.bundle.channels.v1: stable-v1,latest + operators.operatorframework.io.bundle.channel.default.v1: stable-v1 + operators.operatorframework.io.metrics.builder: operator-sdk-v1.28.0 operators.operatorframework.io.metrics.mediatype.v1: metrics+v1 operators.operatorframework.io.metrics.project_layout: go.kubebuilder.io/v2 diff --git a/bundle/scorecard/.vfsignore b/bundle/scorecard/.vfsignore new file mode 100644 index 0000000000..7fcceda23f --- /dev/null +++ b/bundle/scorecard/.vfsignore @@ -0,0 +1,18 @@ +# --------------------------------------------------------------------------- +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You 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. +# --------------------------------------------------------------------------- + +# This dir and subdirs are not included in VFS diff --git a/bundle/scorecard/bases/config.yaml b/bundle/scorecard/bases/config.yaml new file mode 100644 index 0000000000..09ea47c6d5 --- /dev/null +++ b/bundle/scorecard/bases/config.yaml @@ -0,0 +1,24 @@ +# --------------------------------------------------------------------------- +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You 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. +# --------------------------------------------------------------------------- + +apiVersion: scorecard.operatorframework.io/v1alpha3 +kind: Configuration +metadata: + name: config +stages: +- parallel: true + tests: [] diff --git a/bundle/scorecard/kustomization.yaml b/bundle/scorecard/kustomization.yaml new file mode 100644 index 0000000000..7fbd50703c --- /dev/null +++ b/bundle/scorecard/kustomization.yaml @@ -0,0 +1,33 @@ +# --------------------------------------------------------------------------- +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You 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. +# --------------------------------------------------------------------------- + +resources: +- bases/config.yaml +patchesJson6902: +- path: patches/basic.config.yaml + target: + group: scorecard.operatorframework.io + version: v1alpha3 + kind: Configuration + name: config +- path: patches/olm.config.yaml + target: + group: scorecard.operatorframework.io + version: v1alpha3 + kind: Configuration + name: config +# +kubebuilder:scaffold:patchesJson6902 diff --git a/bundle/scorecard/patches/basic.config.yaml b/bundle/scorecard/patches/basic.config.yaml new file mode 100644 index 0000000000..d2278cfbf6 --- /dev/null +++ b/bundle/scorecard/patches/basic.config.yaml @@ -0,0 +1,27 @@ +# --------------------------------------------------------------------------- +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You 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. +# --------------------------------------------------------------------------- + +- op: add + path: /stages/0/tests/- + value: + entrypoint: + - scorecard-test + - basic-check-spec + image: quay.io/operator-framework/scorecard-test:master + labels: + suite: basic + test: basic-check-spec-test diff --git a/bundle/scorecard/patches/olm.config.yaml b/bundle/scorecard/patches/olm.config.yaml new file mode 100644 index 0000000000..675960ea60 --- /dev/null +++ b/bundle/scorecard/patches/olm.config.yaml @@ -0,0 +1,37 @@ +# --------------------------------------------------------------------------- +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You 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. +# --------------------------------------------------------------------------- + +- op: add + path: /stages/0/tests/- + value: + entrypoint: + - scorecard-test + - olm-bundle-validation + image: quay.io/operator-framework/scorecard-test:master + labels: + suite: olm + test: olm-bundle-validation-test +- op: add + path: /stages/0/tests/- + value: + entrypoint: + - scorecard-test + - olm-crds-have-validation + image: quay.io/operator-framework/scorecard-test:master + labels: + suite: olm + test: olm-crds-have-validation-test diff --git a/bundle/tests/scorecard/config.yaml b/bundle/tests/scorecard/config.yaml new file mode 100644 index 0000000000..e9b7568adf --- /dev/null +++ b/bundle/tests/scorecard/config.yaml @@ -0,0 +1,40 @@ +apiVersion: scorecard.operatorframework.io/v1alpha3 +kind: Configuration +metadata: + name: config +stages: +- parallel: true + tests: + - entrypoint: + - scorecard-test + - basic-check-spec + image: quay.io/operator-framework/scorecard-test:master + labels: + suite: basic + test: basic-check-spec-test + storage: + spec: + mountPath: {} + - entrypoint: + - scorecard-test + - olm-bundle-validation + image: quay.io/operator-framework/scorecard-test:master + labels: + suite: olm + test: olm-bundle-validation-test + storage: + spec: + mountPath: {} + - entrypoint: + - scorecard-test + - olm-crds-have-validation + image: quay.io/operator-framework/scorecard-test:master + labels: + suite: olm + test: olm-crds-have-validation-test + storage: + spec: + mountPath: {} +storage: + spec: + mountPath: {}