diff --git a/go.mod b/go.mod index 1a33efbac..42f72ccf0 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,8 @@ module open-cluster-management.io/ocm -go 1.21 +go 1.22.0 + +toolchain go1.22.9 require ( github.com/cloudevents/sdk-go/v2 v2.15.3-0.20240329120647-e6a74efbacbf @@ -13,7 +15,7 @@ require ( github.com/onsi/ginkgo/v2 v2.17.1 github.com/onsi/gomega v1.32.0 github.com/openshift/api v0.0.0-20231218131639-7a5aa77cc72d - github.com/openshift/build-machinery-go v0.0.0-20231128094528-1e9b1b0595c8 + github.com/openshift/build-machinery-go v0.0.0-20250211133638-a00a772ae1a2 github.com/openshift/library-go v0.0.0-20240116081341-964bcb3f545c github.com/pkg/errors v0.9.1 github.com/prometheus/client_golang v1.18.0 diff --git a/go.sum b/go.sum index bb3a0dbcd..c92097e1a 100644 --- a/go.sum +++ b/go.sum @@ -224,8 +224,8 @@ github.com/opencontainers/runc v1.1.3 h1:vIXrkId+0/J2Ymu2m7VjGvbSlAId9XNRPhn2p4b github.com/opencontainers/runc v1.1.3/go.mod h1:1J5XiS+vdZ3wCyZybsuxXZWGrgSr8fFJHLXuG2PsnNg= github.com/openshift/api v0.0.0-20231218131639-7a5aa77cc72d h1:aVjDasSo08KUIltX++Mcl6ptN0ooxh3dRttHBFGVVI0= github.com/openshift/api v0.0.0-20231218131639-7a5aa77cc72d/go.mod h1:RLaNkRn87bQeH3MpTWXCxlSb62qVGBxfQY344jBfVsg= -github.com/openshift/build-machinery-go v0.0.0-20231128094528-1e9b1b0595c8 h1:cu3YUMVGsKIyFyJGO3F6BZKGYQZpCKxAv9cBPgQAca8= -github.com/openshift/build-machinery-go v0.0.0-20231128094528-1e9b1b0595c8/go.mod h1:b1BuldmJlbA/xYtdZvKi+7j5YGB44qJUJDZ9zwiNCfE= +github.com/openshift/build-machinery-go v0.0.0-20250211133638-a00a772ae1a2 h1:Pw/OKhN0r8HZcR4No8qh0QygTvuYsDeZhHsK6T9LC+I= +github.com/openshift/build-machinery-go v0.0.0-20250211133638-a00a772ae1a2/go.mod h1:8jcm8UPtg2mCAsxfqKil1xrmRMI3a+XU2TZ9fF8A7TE= github.com/openshift/client-go v0.0.0-20231218140158-47f6d749b9d9 h1:kjgW3luAkf9NWu+8u+jqNNbexDG+CY82/INw8hGbG14= github.com/openshift/client-go v0.0.0-20231218140158-47f6d749b9d9/go.mod h1:kKmxYRXTMutfF7XzGppFdbLhNGX1brXkRsZx5ID8c7U= github.com/openshift/library-go v0.0.0-20240116081341-964bcb3f545c h1:gLylEQQryG+A6nqWYIwE1wUzn1eFUmthjADvflMWKnM= diff --git a/vendor/github.com/openshift/build-machinery-go/.ci-operator.yaml b/vendor/github.com/openshift/build-machinery-go/.ci-operator.yaml index 7096df34e..1e59c02c2 100644 --- a/vendor/github.com/openshift/build-machinery-go/.ci-operator.yaml +++ b/vendor/github.com/openshift/build-machinery-go/.ci-operator.yaml @@ -1,4 +1,4 @@ build_root_image: name: release namespace: openshift - tag: rhel-9-release-golang-1.20-openshift-4.15 + tag: rhel-9-release-golang-1.22-openshift-4.17 diff --git a/vendor/github.com/openshift/build-machinery-go/.gitignore b/vendor/github.com/openshift/build-machinery-go/.gitignore new file mode 100644 index 000000000..19607d9e6 --- /dev/null +++ b/vendor/github.com/openshift/build-machinery-go/.gitignore @@ -0,0 +1 @@ +*.log.raw diff --git a/vendor/github.com/openshift/build-machinery-go/Dockerfile.commitchecker b/vendor/github.com/openshift/build-machinery-go/Dockerfile.commitchecker index a6d656344..8d7058a15 100644 --- a/vendor/github.com/openshift/build-machinery-go/Dockerfile.commitchecker +++ b/vendor/github.com/openshift/build-machinery-go/Dockerfile.commitchecker @@ -1,12 +1,12 @@ # This Dockerfile must be on the top-level of this repo, because it needs to copy # both commitchecker/ and make/ into the build container. -FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.20-openshift-4.15 AS builder +FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.22-openshift-4.17 AS builder WORKDIR /go/src/github.com/openshift/build-machinery-go COPY . . RUN make -C commitchecker -FROM registry.ci.openshift.org/ocp/4.15:base +FROM registry.ci.openshift.org/ocp/4.17:base-rhel9 COPY --from=builder /go/src/github.com/openshift/build-machinery-go/commitchecker/commitchecker /usr/bin/ RUN dnf install --setopt=tsflags=nodocs -y git && \ dnf clean all && rm -rf /var/cache/yum/* diff --git a/vendor/github.com/openshift/build-machinery-go/OWNERS b/vendor/github.com/openshift/build-machinery-go/OWNERS index e016cc303..1bbac46c7 100644 --- a/vendor/github.com/openshift/build-machinery-go/OWNERS +++ b/vendor/github.com/openshift/build-machinery-go/OWNERS @@ -1,9 +1,9 @@ reviewers: - - sttts - - mfojtik - - soltysh - 2uasimojo + - benluddy + - jsafrane + - sanchezl approvers: - - sttts - - mfojtik - - soltysh + - benluddy + - jsafrane + - sanchezl diff --git a/vendor/github.com/openshift/build-machinery-go/make/operator.example.mk.help.log b/vendor/github.com/openshift/build-machinery-go/make/operator.example.mk.help.log index 47b04e6fe..b636e3926 100644 --- a/vendor/github.com/openshift/build-machinery-go/make/operator.example.mk.help.log +++ b/vendor/github.com/openshift/build-machinery-go/make/operator.example.mk.help.log @@ -13,6 +13,7 @@ image-ocp-openshift-apiserver-operator images telepresence test +test-operator-integration test-unit update update-bindata @@ -21,6 +22,7 @@ update-deps-overrides update-generated update-gofmt update-profile-manifests +update-test-operator-integration verify verify-bindata verify-codegen diff --git a/vendor/github.com/openshift/build-machinery-go/make/targets/golang/version.mk b/vendor/github.com/openshift/build-machinery-go/make/targets/golang/version.mk index f84ceb92e..bdd7f479d 100644 --- a/vendor/github.com/openshift/build-machinery-go/make/targets/golang/version.mk +++ b/vendor/github.com/openshift/build-machinery-go/make/targets/golang/version.mk @@ -43,7 +43,7 @@ $(call verify-golang-version-reference,$(1),$(shell grep "AS builder" "$(1)" | s endef define verify-go-mod-golang-version -$(call verify-golang-version-reference,go.mod,$(shell grep -e 'go [[:digit:]]*\.[[:digit:]]*' go.mod 2>/dev/null | sed 's/go //')) +$(call verify-golang-version-reference,go.mod,$(shell grep -e 'go [[:digit:]]*\.[[:digit:]]*' go.mod 2>/dev/null | sed 's/go \([[:digit:]][[:digit:]]*.[[:digit:]][[:digit:]]*\).*/\1/')) endef define verify-buildroot-golang-version diff --git a/vendor/github.com/openshift/build-machinery-go/make/targets/openshift/controller-gen.mk b/vendor/github.com/openshift/build-machinery-go/make/targets/openshift/controller-gen.mk index 4e15c771a..c64e5cf92 100644 --- a/vendor/github.com/openshift/build-machinery-go/make/targets/openshift/controller-gen.mk +++ b/vendor/github.com/openshift/build-machinery-go/make/targets/openshift/controller-gen.mk @@ -3,6 +3,26 @@ include $(addprefix $(dir $(lastword $(MAKEFILE_LIST))), \ ../../lib/tmp.mk \ ) +############## +# DEPRECATED # +############## +# This utility is hard to maintain due to the need to continuously build and release binaries for +# multiple platforms and versions. Instead it is recommended that you: +# - Vendor the sigs.k8s.io/controller-tools repository. +# - Write a local rule to (lazily) build the controller-gen binary from the vendored repo. +# For example: +# +# CONTROLLER_GEN_SRC := $(shell realpath vendor/sigs.k8s.io/controller-tools/cmd/controller-gen) +# CONTROLLER_GEN := $(shell go list -f '{{.Target}}' $(CONTROLLER_GEN_SRC)) +# $(CONTROLLER_GEN): $(CONTROLLER_GEN_SRC) +# go install $(CONTROLLER_GEN_SRC) +# +# This allows you to upgrade versions simply by revendoring controller-tools: +# - Bump the semver in your go.mod +# - go mod tidy +# - go mod vendor +############## + # NOTE: The release binary specified here needs to be built properly so that # `--version` works correctly. Just using `go build` will result in it # reporting `(devel)`. To build for a given platform: diff --git a/vendor/github.com/openshift/build-machinery-go/make/targets/openshift/images.mk b/vendor/github.com/openshift/build-machinery-go/make/targets/openshift/images.mk index c53c3f1b9..90096dc5d 100644 --- a/vendor/github.com/openshift/build-machinery-go/make/targets/openshift/images.mk +++ b/vendor/github.com/openshift/build-machinery-go/make/targets/openshift/images.mk @@ -7,15 +7,21 @@ include $(addprefix $(dir $(lastword $(MAKEFILE_LIST))), \ # make images IMAGE_BUILD_EXTRA_FLAGS='-mount ~/projects/origin-repos/4.2/:/etc/yum.repos.d/' IMAGE_BUILD_DEFAULT_FLAGS ?=--allow-pull IMAGE_BUILD_EXTRA_FLAGS ?= +IMAGE_BUILD_BUILDER ?= imagebuilder # $1 - target name # $2 - image ref # $3 - Dockerfile path # $4 - context +# only run ensure-imagebuilder when imagebuilder is used define build-image-internal +ifeq ($(IMAGE_BUILD_BUILDER),imagebuilder) image-$(1): ensure-imagebuilder +else +image-$(1): +endif $(strip \ - imagebuilder \ + $(IMAGE_BUILD_BUILDER) \ $(IMAGE_BUILD_DEFAULT_FLAGS) \ -t $(2) -f $(3) \ diff --git a/vendor/github.com/openshift/build-machinery-go/make/targets/openshift/operator/mom.mk b/vendor/github.com/openshift/build-machinery-go/make/targets/openshift/operator/mom.mk new file mode 100644 index 000000000..21c81afe0 --- /dev/null +++ b/vendor/github.com/openshift/build-machinery-go/make/targets/openshift/operator/mom.mk @@ -0,0 +1,10 @@ +scripts_dir :=$(shell realpath $(dir $(lastword $(MAKEFILE_LIST)))../../../../scripts) + +test-operator-integration: build + bash $(scripts_dir)/test-operator-integration.sh +.PHONY: test-operator-integration + +update-test-operator-integration: build + REPLACE_TEST_OUTPUT=true bash $(scripts_dir)/test-operator-integration.sh + +.PHONY: update-test-operator-integration diff --git a/vendor/github.com/openshift/build-machinery-go/scripts/test-operator-integration.sh b/vendor/github.com/openshift/build-machinery-go/scripts/test-operator-integration.sh new file mode 100644 index 000000000..262bf6010 --- /dev/null +++ b/vendor/github.com/openshift/build-machinery-go/scripts/test-operator-integration.sh @@ -0,0 +1,52 @@ +#!/usr/bin/env bash + +set -o errexit +set -o nounset +set -o pipefail +set -x + +# Install multi-operator-manager. This will make sure the latest binary is installed +# If the installation failed, keep going, maybe the binary is available in the system +echo "Installing latest version of multi-operator-manager..." +if ! go install -mod=readonly github.com/openshift/multi-operator-manager/cmd/multi-operator-manager@latest; then + echo "Error: Failed to install multi-operator-manager." +fi + +# Check if the multi-operator-manager is installed; if not, fail +if ! command -v multi-operator-manager &> /dev/null; then + echo "Error: multi-operator-manager binary not available." + exit 1 +fi + +REPLACE_TEST_OUTPUT="${REPLACE_TEST_OUTPUT:-false}" + +# Define the path to the operator binary +MOM_CMD="${MOM_CMD:-multi-operator-manager}" + +# Define input and output directories (can be overridden if necessary) +APPLY_CONFIG_INPUT_DIR="${APPLY_CONFIG_INPUT_DIR:-./test-data/apply-configuration}" +APPLY_CONFIG_OUTPUT_DIR="${ARTIFACT_DIR:-./test-output}" + +# Make sure the output-dir is clean +if [ -d "${APPLY_CONFIG_OUTPUT_DIR}" ]; then + echo "Cleaning up existing ${APPLY_CONFIG_OUTPUT_DIR}" + rm -rf "${APPLY_CONFIG_OUTPUT_DIR}" +fi + +# Assemble the args +APPLY_CONFIG_ARGS=( + test + apply-configuration + --test-dir="$APPLY_CONFIG_INPUT_DIR" + --output-dir="$APPLY_CONFIG_OUTPUT_DIR" +) + +if [ "$REPLACE_TEST_OUTPUT" == "true" ] +then + APPLY_CONFIG_ARGS=("${APPLY_CONFIG_ARGS[@]}" "--replace-expected-output=true") +else + APPLY_CONFIG_ARGS=("${APPLY_CONFIG_ARGS[@]}" "--preserve-policy=KeepAlways") +fi + +# Run the apply-configuration command from the operator +"${MOM_CMD}" "${APPLY_CONFIG_ARGS[@]}" diff --git a/vendor/modules.txt b/vendor/modules.txt index f06ed319a..956d753c5 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -368,8 +368,8 @@ github.com/openshift/api/template github.com/openshift/api/template/v1 github.com/openshift/api/user github.com/openshift/api/user/v1 -# github.com/openshift/build-machinery-go v0.0.0-20231128094528-1e9b1b0595c8 -## explicit; go 1.13 +# github.com/openshift/build-machinery-go v0.0.0-20250211133638-a00a772ae1a2 +## explicit; go 1.22.0 github.com/openshift/build-machinery-go github.com/openshift/build-machinery-go/make github.com/openshift/build-machinery-go/make/lib diff --git a/vendor/open-cluster-management.io/addon-framework/pkg/addonfactory/testmanifests/chart/Chart.yaml b/vendor/open-cluster-management.io/addon-framework/pkg/addonfactory/testmanifests/chart/Chart.yaml deleted file mode 100644 index 198f05e66..000000000 --- a/vendor/open-cluster-management.io/addon-framework/pkg/addonfactory/testmanifests/chart/Chart.yaml +++ /dev/null @@ -1,5 +0,0 @@ -apiVersion: v1 -description: A Helm chart for test -name: test -version: 2.2.0 -appVersion: "2.2.0" diff --git a/vendor/open-cluster-management.io/addon-framework/pkg/addonfactory/testmanifests/chart/crds/test_crd.yaml b/vendor/open-cluster-management.io/addon-framework/pkg/addonfactory/testmanifests/chart/crds/test_crd.yaml deleted file mode 100644 index 55e70e1b8..000000000 --- a/vendor/open-cluster-management.io/addon-framework/pkg/addonfactory/testmanifests/chart/crds/test_crd.yaml +++ /dev/null @@ -1,195 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - name: test.cluster.open-cluster-management.io -spec: - group: cluster.open-cluster-management.io - names: - kind: ClusterClaim - listKind: ClusterClaimList - plural: clusterclaims - singular: clusterclaim - scope: Cluster - preserveUnknownFields: false - versions: - - additionalPrinterColumns: - - jsonPath: .spec.addOnMeta.displayName - name: DISPLAY NAME - type: string - - jsonPath: .spec.addOnConfiguration.crdName - name: CRD NAME - type: string - name: v1alpha1 - schema: - openAPIV3Schema: - description: ClusterManagementAddOn represents the registration of an add-on to the cluster manager. This resource allows the user to discover which add-on is available for the cluster manager and also provides metadata information about the add-on. This resource also provides a linkage to ManagedClusterAddOn, the name of the ClusterManagementAddOn resource will be used for the namespace-scoped ManagedClusterAddOn resource. ClusterManagementAddOn is a cluster-scoped resource. - type: object - 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: spec represents a desired configuration for the agent on the cluster management add-on. - type: object - properties: - addOnConfiguration: - description: 'Deprecated: Use supportedConfigs filed instead addOnConfiguration is a reference to configuration information for the add-on. In scenario where a multiple add-ons share the same add-on CRD, multiple ClusterManagementAddOn resources need to be created and reference the same AddOnConfiguration.' - type: object - properties: - crName: - description: crName is the name of the CR used to configure instances of the managed add-on. This field should be configured if add-on CR have a consistent name across the all of the ManagedCluster instaces. - type: string - crdName: - description: crdName is the name of the CRD used to configure instances of the managed add-on. This field should be configured if the add-on have a CRD that controls the configuration of the add-on. - type: string - lastObservedGeneration: - description: lastObservedGeneration is the observed generation of the custom resource for the configuration of the addon. - type: integer - format: int64 - addOnMeta: - description: addOnMeta is a reference to the metadata information for the add-on. - type: object - properties: - description: - description: description represents the detailed description of the add-on. - type: string - displayName: - description: displayName represents the name of add-on that will be displayed. - type: string - installStrategy: - description: InstallStrategy represents that related ManagedClusterAddOns should be installed on certain clusters. - type: object - default: - type: Manual - properties: - placements: - description: Placements is a list of placement references honored when install strategy type is Placements. All clusters selected by these placements will install the addon If one cluster belongs to multiple placements, it will only apply the strategy defined later in the order. That is to say, The latter strategy overrides the previous one. - type: array - items: - type: object - required: - - name - - namespace - properties: - configs: - description: Configs is the configuration of managedClusterAddon during installation. User can override the configuration by updating the managedClusterAddon directly. - type: array - items: - type: object - required: - - name - - resource - properties: - group: - description: group of the add-on configuration. - type: string - default: "" - name: - description: name of the add-on configuration. - type: string - minLength: 1 - namespace: - description: namespace of the add-on configuration. If this field is not set, the configuration is in the cluster scope. - type: string - resource: - description: resource of the add-on configuration. - type: string - minLength: 1 - name: - description: Name is the name of the placement - type: string - minLength: 1 - namespace: - description: Namespace is the namespace of the placement - type: string - minLength: 1 - x-kubernetes-list-map-keys: - - namespace - - name - x-kubernetes-list-type: map - type: - description: 'Type is the type of the install strategy, it can be: - Manual: no automatic install - Placements: install to clusters selected by placements.' - type: string - default: Manual - enum: - - Manual - - Placements - supportedConfigs: - description: supportedConfigs is a list of configuration types supported by add-on. An empty list means the add-on does not require configurations. The default is an empty list - type: array - items: - description: ConfigMeta represents a collection of metadata information for add-on configuration. - type: object - required: - - resource - properties: - defaultConfig: - description: defaultConfig represents the namespace and name of the default add-on configuration. In scenario where all add-ons have a same configuration. - type: object - required: - - name - properties: - name: - description: name of the add-on configuration. - type: string - minLength: 1 - namespace: - description: namespace of the add-on configuration. If this field is not set, the configuration is in the cluster scope. - type: string - group: - description: group of the add-on configuration. - type: string - default: "" - resource: - description: resource of the add-on configuration. - type: string - minLength: 1 - x-kubernetes-list-map-keys: - - group - - resource - x-kubernetes-list-type: map - status: - description: status represents the current status of cluster management add-on. - type: object - allOf: - - id: "abc" - items: - - schema: - description: test - oneOf: - - id: "abc" - patternProperties: - abc: - description: test - dependencies: - abc: - property: - - "abc" - definitions: - abc: - description: test - anyOf: - - id: "abc" - additionalProperties: - schema: - description: test - additionalItems: - schema: - description: test - not: - description: test - served: true - storage: true - subresources: - status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/vendor/open-cluster-management.io/addon-framework/pkg/addonfactory/testmanifests/chart/templates/_helpers.tpl b/vendor/open-cluster-management.io/addon-framework/pkg/addonfactory/testmanifests/chart/templates/_helpers.tpl deleted file mode 100644 index 5e8e62ea4..000000000 --- a/vendor/open-cluster-management.io/addon-framework/pkg/addonfactory/testmanifests/chart/templates/_helpers.tpl +++ /dev/null @@ -1,32 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "test.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "test.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "test.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} -{{- end -}} diff --git a/vendor/open-cluster-management.io/addon-framework/pkg/addonfactory/testmanifests/chart/templates/clusterclaim.yaml b/vendor/open-cluster-management.io/addon-framework/pkg/addonfactory/testmanifests/chart/templates/clusterclaim.yaml deleted file mode 100644 index a404675da..000000000 --- a/vendor/open-cluster-management.io/addon-framework/pkg/addonfactory/testmanifests/chart/templates/clusterclaim.yaml +++ /dev/null @@ -1,14 +0,0 @@ -{{- if not (eq .Values.clusterName "local-cluster") }} -apiVersion: cluster.open-cluster-management.io/v1alpha1 -kind: ClusterClaim -metadata: - annotations: - hubKubeConfigSecret: {{ .Values.hubKubeConfigSecret }} - managedKubeConfigSecret: {{ .Values.managedKubeConfigSecret }} - labels: - open-cluster-management.io/hub-managed: "" - open-cluster-management.io/spoke-only: "" - name: clusterName -spec: - value: {{ .Values.clusterName }} -{{- end }} diff --git a/vendor/open-cluster-management.io/addon-framework/pkg/addonfactory/testmanifests/chart/templates/clusterclaim_crd.yaml b/vendor/open-cluster-management.io/addon-framework/pkg/addonfactory/testmanifests/chart/templates/clusterclaim_crd.yaml deleted file mode 100644 index 465ceea67..000000000 --- a/vendor/open-cluster-management.io/addon-framework/pkg/addonfactory/testmanifests/chart/templates/clusterclaim_crd.yaml +++ /dev/null @@ -1,249 +0,0 @@ -{{- if not (eq .Values.clusterName "local-cluster") }} -{{- if semverCompare "< 1.16.0" .Capabilities.KubeVersion.Version }} ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: clusterclaims.cluster.open-cluster-management.io -spec: - group: cluster.open-cluster-management.io - names: - kind: ClusterClaim - listKind: ClusterClaimList - plural: clusterclaims - singular: clusterclaim - scope: Cluster - preserveUnknownFields: false - versions: - - additionalPrinterColumns: - - jsonPath: .spec.addOnMeta.displayName - name: DISPLAY NAME - type: string - - jsonPath: .spec.addOnConfiguration.crdName - name: CRD NAME - type: string - name: v1alpha1 - schema: - openAPIV3Schema: - description: ClusterManagementAddOn represents the registration of an add-on to the cluster manager. This resource allows the user to discover which add-on is available for the cluster manager and also provides metadata information about the add-on. This resource also provides a linkage to ManagedClusterAddOn, the name of the ClusterManagementAddOn resource will be used for the namespace-scoped ManagedClusterAddOn resource. ClusterManagementAddOn is a cluster-scoped resource. - type: object - 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: spec represents a desired configuration for the agent on the cluster management add-on. - type: object - properties: - addOnConfiguration: - description: 'Deprecated: Use supportedConfigs filed instead addOnConfiguration is a reference to configuration information for the add-on. In scenario where a multiple add-ons share the same add-on CRD, multiple ClusterManagementAddOn resources need to be created and reference the same AddOnConfiguration.' - type: object - properties: - crName: - description: crName is the name of the CR used to configure instances of the managed add-on. This field should be configured if add-on CR have a consistent name across the all of the ManagedCluster instaces. - type: string - crdName: - description: crdName is the name of the CRD used to configure instances of the managed add-on. This field should be configured if the add-on have a CRD that controls the configuration of the add-on. - type: string - lastObservedGeneration: - description: lastObservedGeneration is the observed generation of the custom resource for the configuration of the addon. - type: integer - format: int64 - addOnMeta: - description: addOnMeta is a reference to the metadata information for the add-on. - type: object - properties: - description: - description: description represents the detailed description of the add-on. - type: string - displayName: - description: displayName represents the name of add-on that will be displayed. - type: string - installStrategy: - description: InstallStrategy represents that related ManagedClusterAddOns should be installed on certain clusters. - type: object - default: - type: Manual - properties: - placements: - description: Placements is a list of placement references honored when install strategy type is Placements. All clusters selected by these placements will install the addon If one cluster belongs to multiple placements, it will only apply the strategy defined later in the order. That is to say, The latter strategy overrides the previous one. - type: array - items: - type: object - required: - - name - - namespace - properties: - configs: - description: Configs is the configuration of managedClusterAddon during installation. User can override the configuration by updating the managedClusterAddon directly. - type: array - items: - type: object - required: - - name - - resource - properties: - group: - description: group of the add-on configuration. - type: string - default: "" - name: - description: name of the add-on configuration. - type: string - minLength: 1 - namespace: - description: namespace of the add-on configuration. If this field is not set, the configuration is in the cluster scope. - type: string - resource: - description: resource of the add-on configuration. - type: string - minLength: 1 - name: - description: Name is the name of the placement - type: string - minLength: 1 - namespace: - description: Namespace is the namespace of the placement - type: string - minLength: 1 - x-kubernetes-list-map-keys: - - namespace - - name - x-kubernetes-list-type: map - type: - description: 'Type is the type of the install strategy, it can be: - Manual: no automatic install - Placements: install to clusters selected by placements.' - type: string - default: Manual - enum: - - Manual - - Placements - supportedConfigs: - description: supportedConfigs is a list of configuration types supported by add-on. An empty list means the add-on does not require configurations. The default is an empty list - type: array - items: - description: ConfigMeta represents a collection of metadata information for add-on configuration. - type: object - required: - - resource - properties: - defaultConfig: - description: defaultConfig represents the namespace and name of the default add-on configuration. In scenario where all add-ons have a same configuration. - type: object - required: - - name - properties: - name: - description: name of the add-on configuration. - type: string - minLength: 1 - namespace: - description: namespace of the add-on configuration. If this field is not set, the configuration is in the cluster scope. - type: string - group: - description: group of the add-on configuration. - type: string - default: "" - resource: - description: resource of the add-on configuration. - type: string - minLength: 1 - x-kubernetes-list-map-keys: - - group - - resource - x-kubernetes-list-type: map - status: - description: status represents the current status of cluster management add-on. - type: object - allOf: - - id: "abc" - items: - - schema: - description: test - oneOf: - - id: "abc" - patternProperties: - abc: - description: test - dependencies: - abc: - property: - - "abc" - definitions: - abc: - description: test - anyOf: - - id: "abc" - additionalProperties: - schema: - description: test - additionalItems: - schema: - description: test - not: - description: test - served: true - storage: true - subresources: - status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] - -{{ else }} - ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - name: clusterclaims.cluster.open-cluster-management.io -spec: - group: cluster.open-cluster-management.io - names: - kind: ClusterClaim - listKind: ClusterClaimList - plural: clusterclaims - singular: clusterclaim - scope: Cluster - preserveUnknownFields: false - versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - description: ClusterClaim represents cluster information that a managed cluster claims ClusterClaims with well known names include, 1. id.k8s.io, it contains a unique identifier for the cluster. 2. clusterset.k8s.io, it contains an identifier that relates the cluster to the ClusterSet in which it belongs. ClusterClaims created on a managed cluster will be collected and saved into the status of the corresponding ManagedCluster on hub. - type: object - 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: Spec defines the attributes of the ClusterClaim. - type: object - properties: - value: - description: Value is a claim-dependent string - type: string - maxLength: 1024 - minLength: 1 - served: true - storage: true -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] -{{- end }} -{{- end }} diff --git a/vendor/open-cluster-management.io/addon-framework/pkg/addonfactory/testmanifests/chart/templates/deployment.yaml b/vendor/open-cluster-management.io/addon-framework/pkg/addonfactory/testmanifests/chart/templates/deployment.yaml deleted file mode 100644 index 4604895fa..000000000 --- a/vendor/open-cluster-management.io/addon-framework/pkg/addonfactory/testmanifests/chart/templates/deployment.yaml +++ /dev/null @@ -1,103 +0,0 @@ -{{- if .Values.enabled }} -kind: Deployment -apiVersion: apps/v1 -metadata: - name: {{ template "test.fullname" . }}-addon - namespace: {{ .Release.Namespace }} - labels: - app: {{ template "test.name" . }}-addon - chart: {{ template "test.chart" . }} - component: "addon" - release: {{ .Release.Name }} - controller: "operator" - hubKubeConfigSecret: {{ .Values.hubKubeConfigSecret }} -spec: - {{- if eq .Values.clusterName "local-cluster" }} - replicas: 3 - {{- else }} - replicas: 1 - {{- end }} - selector: - matchLabels: - app: {{ template "test.name" . }}-addon - component: "addon" - release: {{ .Release.Name }} - template: - metadata: - labels: - app: {{ template "test.name" . }}-addon - component: "addon" - controller: "operator" - release: {{ .Release.Name }} - chart: {{ template "test.chart" . }} - spec: - serviceAccountName: {{ template "test.fullname" . }} - containers: - - name: test - image: "{{ .Values.global.imageOverrides.testImage }}" - imagePullPolicy: "{{ .Values.imagePullPolicy }}" - resources: - {{- toYaml .Values.resources | nindent 10 }} - command: ["test"] - env: - - name: WATCH_NAMESPACE - value: "{{ .Values.clusterName }}" - - name: POD_NAME - valueFrom: - fieldRef: - fieldPath: metadata.name - - name: OPERATOR_NAME - value: "test" - {{- if .Values.global.proxyConfig.HTTP_PROXY }} - - name: HTTP_PROXY - value: {{ .Values.global.proxyConfig.HTTP_PROXY }} - {{- end }} - {{- if .Values.global.proxyConfig.HTTPS_PROXY }} - - name: HTTPS_PROXY - value: {{ .Values.global.proxyConfig.HTTPS_PROXY }} - {{- end }} - {{- if .Values.global.proxyConfig.NO_PROXY }} - - name: NO_PROXY - value: {{ .Values.global.proxyConfig.NO_PROXY }} - {{- end }} - args: - - '--enable-lease=true' - {{- if semverCompare "< 1.14.0" .Capabilities.KubeVersion.Version }} - - --legacy-leader-elect=true - {{- end }} - livenessProbe: - httpGet: - path: /healthz - port: 8081 - failureThreshold: 3 - periodSeconds: 10 - readinessProbe: - httpGet: - path: /readyz - port: 8081 - failureThreshold: 3 - periodSeconds: 10 - volumeMounts: - - name: klusterlet-config - mountPath: /var/run/klusterlet - volumes: - - name: klusterlet-config - secret: - secretName: {{ .Values.hubKubeConfigSecret }} - {{- if .Values.imagePullSecret }} - imagePullSecrets: - - name: "{{ .Values.imagePullSecret }}" - {{- end }} - {{- with .Values.global.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} -{{- end }} diff --git a/vendor/open-cluster-management.io/addon-framework/pkg/addonfactory/testmanifests/chart/templates/multi_resources.yaml b/vendor/open-cluster-management.io/addon-framework/pkg/addonfactory/testmanifests/chart/templates/multi_resources.yaml deleted file mode 100644 index 7b93d1f4b..000000000 --- a/vendor/open-cluster-management.io/addon-framework/pkg/addonfactory/testmanifests/chart/templates/multi_resources.yaml +++ /dev/null @@ -1,21 +0,0 @@ -{{- if (eq .Values.clusterName "cluster2") }} -apiVersion: cluster.open-cluster-management.io/v1alpha1 -kind: ClusterClaim -metadata: - labels: - open-cluster-management.io/hub-managed: "" - open-cluster-management.io/spoke-only: "" - name: cc1 -spec: - value: {{ .Values.clusterName }} ---- -apiVersion: cluster.open-cluster-management.io/v1alpha1 -kind: ClusterClaim -metadata: - labels: - open-cluster-management.io/hub-managed: "" - open-cluster-management.io/spoke-only: "" - name: cc2 -spec: - value: {{ .Values.clusterName }} -{{- end }} diff --git a/vendor/open-cluster-management.io/addon-framework/pkg/addonfactory/testmanifests/chart/templates/namespace_hosted_mode.yaml b/vendor/open-cluster-management.io/addon-framework/pkg/addonfactory/testmanifests/chart/templates/namespace_hosted_mode.yaml deleted file mode 100644 index 00be8aa0f..000000000 --- a/vendor/open-cluster-management.io/addon-framework/pkg/addonfactory/testmanifests/chart/templates/namespace_hosted_mode.yaml +++ /dev/null @@ -1,8 +0,0 @@ -{{- if .Values.hostingClusterCapabilities.KubeVersion.Version }} -{{- if semverCompare "> 1.16.0" .Values.hostingClusterCapabilities.KubeVersion.Version }} -apiVersion: v1 -kind: Namespace -metadata: - name: "newer-k8s" -{{- end }} -{{- end }} \ No newline at end of file diff --git a/vendor/open-cluster-management.io/addon-framework/pkg/addonfactory/testmanifests/chart/values.yaml b/vendor/open-cluster-management.io/addon-framework/pkg/addonfactory/testmanifests/chart/values.yaml deleted file mode 100644 index 2c9d28c55..000000000 --- a/vendor/open-cluster-management.io/addon-framework/pkg/addonfactory/testmanifests/chart/values.yaml +++ /dev/null @@ -1,42 +0,0 @@ -org: open-cluster-management - -enabled: true -hubKubeConfigSecret: null -fullnameOverride: "test-addon" -nameOverride: "test-addon" - -clusterName: null -clusterNamespace: null - -resources: - requests: - memory: 128Mi - limits: - memory: 256Mi - -affinity: {} - -tolerations: -- key: "dedicated" - operator: "Equal" - value: "infra" - effect: "NoSchedule" -- key: node-role.kubernetes.io/infra - operator: Exists - effect: NoSchedule - -postDeleteJobServiceAccount: null - -imagePullPolicy: IfNotPresent -imagePullSecret: null - -global: - imagePullPolicy: IfNotPresent - imagePullSecret: null - imageOverrides: - testImage: quay.io/testimage:test - nodeSelector: {} - proxyConfig: - HTTP_PROXY: null - HTTPS_PROXY: null - NO_PROXY: null diff --git a/vendor/open-cluster-management.io/addon-framework/pkg/addonfactory/testmanifests/template/clusterclaim.yaml b/vendor/open-cluster-management.io/addon-framework/pkg/addonfactory/testmanifests/template/clusterclaim.yaml deleted file mode 100644 index 4e8070cfd..000000000 --- a/vendor/open-cluster-management.io/addon-framework/pkg/addonfactory/testmanifests/template/clusterclaim.yaml +++ /dev/null @@ -1,15 +0,0 @@ -{{ if not (eq .ClusterName "local-cluster") }} ---- -apiVersion: cluster.open-cluster-management.io/v1alpha1 -kind: ClusterClaim -metadata: - annotations: - hubKubeConfigSecret: {{ .HubKubeConfigSecret }} - managedKubeConfigSecret: {{ .ManagedKubeConfigSecret }} - labels: - open-cluster-management.io/hub-managed: "" - open-cluster-management.io/spoke-only: "" - name: {{ .AddonInstallNamespace }} -spec: - value: {{ .Image }} -{{ end }} diff --git a/vendor/open-cluster-management.io/addon-framework/pkg/addonfactory/testmanifests/template/deployment.yaml b/vendor/open-cluster-management.io/addon-framework/pkg/addonfactory/testmanifests/template/deployment.yaml deleted file mode 100644 index 4d66c1b35..000000000 --- a/vendor/open-cluster-management.io/addon-framework/pkg/addonfactory/testmanifests/template/deployment.yaml +++ /dev/null @@ -1,41 +0,0 @@ -kind: Deployment -apiVersion: apps/v1 -metadata: - name: helloworld-agent - namespace: {{ .AddonInstallNamespace }} - labels: - app: helloworld-agent - clusterName: {{ .ClusterName }} -spec: - replicas: 1 - selector: - matchLabels: - app: helloworld-agent - template: - metadata: - labels: - app: helloworld-agent - spec: - serviceAccountName: helloworld-agent-sa -{{- if .NodeSelector }} - nodeSelector: - {{- range $key, $value := .NodeSelector }} - "{{ $key }}": "{{ $value }}" - {{- end }} -{{- end }} - volumes: - - name: hub-config - secret: - secretName: {{ .KubeConfigSecret }} - containers: - - name: helloworld-agent - image: {{ .Image }} - imagePullPolicy: IfNotPresent - args: - - "/helloworld" - - "agent" - - "--hub-kubeconfig=/var/run/hub/kubeconfig" - - "--cluster-name={{ .ClusterName }}" - volumeMounts: - - name: hub-config - mountPath: /var/run/hub