mirror of
https://github.com/open-cluster-management-io/ocm.git
synced 2026-05-14 05:07:48 +00:00
Merge pull request #88 from zhiweiyin318/upgrade-operator-sdk
upgrade operator-sdk to 1.0.1 and olm to 0.16.1
This commit is contained in:
38
Makefile
38
Makefile
@@ -17,7 +17,7 @@ IMAGE_TAG?=latest
|
||||
IMAGE_NAME?=$(IMAGE_REGISTRY)/registration-operator:$(IMAGE_TAG)
|
||||
|
||||
# CSV_VERSION is used to generate new CSV manifests
|
||||
CSV_VERSION?=0.2.0
|
||||
CSV_VERSION?=0.3.0
|
||||
|
||||
# WORK_IMAGE can be set in the env to override calculated value
|
||||
WORK_TAG?=latest
|
||||
@@ -28,10 +28,11 @@ REGISTRATION_TAG?=latest
|
||||
REGISTRATION_IMAGE?=$(IMAGE_REGISTRY)/registration:$(REGISTRATION_TAG)
|
||||
|
||||
OPERATOR_SDK?=$(PERMANENT_TMP_GOPATH)/bin/operator-sdk
|
||||
OPERATOR_SDK_VERSION?=v0.17.0
|
||||
OPERATOR_SDK_VERSION?=v1.0.1
|
||||
operatorsdk_gen_dir:=$(dir $(OPERATOR_SDK))
|
||||
# On openshift, OLM is installed into openshift-operator-lifecycle-manager
|
||||
OLM_NAMESPACE?=olm
|
||||
OLM_VERSION?=0.16.1
|
||||
|
||||
KUBECTL?=kubectl
|
||||
KUBECONFIG?=./.kubeconfig
|
||||
@@ -66,10 +67,17 @@ verify-crds:
|
||||
|
||||
verify: verify-crds
|
||||
|
||||
# should set the correct IMAGE_TAG and IMAGE_NAME for the new csv
|
||||
update-csv: ensure-operator-sdk
|
||||
$(OPERATOR_SDK) generate csv --crd-dir=deploy/cluster-manager/crds --deploy-dir=deploy/cluster-manager --output-dir=deploy/cluster-manager/olm-catalog/cluster-manager --operator-name=cluster-manager --csv-version=$(CSV_VERSION)
|
||||
$(OPERATOR_SDK) generate csv --crd-dir=deploy/klusterlet/crds --deploy-dir=deploy/klusterlet --output-dir=deploy/klusterlet/olm-catalog/klusterlet --operator-name=klusterlet --csv-version=$(CSV_VERSION)
|
||||
cd deploy/cluster-manager && ../../$(OPERATOR_SDK) generate bundle --manifests --deploy-dir config/ --crds-dir config/crds/ --output-dir olm-catalog/cluster-manager/ --version $(CSV_VERSION)
|
||||
cd deploy/klusterlet && ../../$(OPERATOR_SDK) generate bundle --manifests --deploy-dir config/ --crds-dir config/crds/ --output-dir olm-catalog/klusterlet/ --version=$(CSV_VERSION)
|
||||
|
||||
# TODO: delete this when operator-sdk fix this issue that sets 'null' to array in yaml.
|
||||
$(SED_CMD) -e "s,rules: null,rules: []," -i deploy/cluster-manager/olm-catalog/cluster-manager/manifests/cluster-manager.clusterserviceversion.yaml
|
||||
$(SED_CMD) -e "s,rules: null,rules: []," -i deploy/klusterlet/olm-catalog/klusterlet/manifests/klusterlet.clusterserviceversion.yaml
|
||||
|
||||
# delete useless serviceaccounts in manifests although they are copied from config by operator-sdk.
|
||||
rm ./deploy/cluster-manager/olm-catalog/cluster-manager/manifests/cluster-manager_v1_serviceaccount.yaml
|
||||
rm ./deploy/klusterlet/olm-catalog/klusterlet/manifests/klusterlet_v1_serviceaccount.yaml
|
||||
|
||||
munge-hub-csv:
|
||||
mkdir -p munge-csv
|
||||
@@ -90,20 +98,20 @@ deploy: install-olm deploy-hub deploy-spoke unmunge-csv
|
||||
clean-deploy: clean-spoke clean-hub
|
||||
|
||||
install-olm: ensure-operator-sdk
|
||||
$(KUBECTL) get crds | grep clusterserviceversion ; if [ $$? -ne 0 ] ; then $(OPERATOR_SDK) olm install --version 0.15.0; fi
|
||||
$(KUBECTL) get crds | grep clusterserviceversion ; if [ $$? -ne 0 ] ; then $(OPERATOR_SDK) olm install --version $(OLM_VERSION); fi
|
||||
$(KUBECTL) get ns open-cluster-management ; if [ $$? -ne 0 ] ; then $(KUBECTL) create ns open-cluster-management ; fi
|
||||
|
||||
deploy-hub: deploy-hub-operator apply-hub-cr
|
||||
|
||||
deploy-hub-operator: install-olm munge-hub-csv
|
||||
$(OPERATOR_SDK) run --olm --operator-namespace open-cluster-management --operator-version $(CSV_VERSION) --manifests deploy/cluster-manager/olm-catalog/cluster-manager --olm-namespace $(OLM_NAMESPACE) --timeout 10m
|
||||
|
||||
$(OPERATOR_SDK) run packagemanifests deploy/cluster-manager/olm-catalog/cluster-manager/ --namespace open-cluster-management --version $(CSV_VERSION) --install-mode SingleNamespace=open-cluster-management --timeout=10m
|
||||
|
||||
apply-hub-cr:
|
||||
$(SED_CMD) -e "s,quay.io/open-cluster-management/registration,$(REGISTRATION_IMAGE)," deploy/cluster-manager/crds/operator_open-cluster-management_clustermanagers.cr.yaml | $(KUBECTL) apply -f -
|
||||
$(SED_CMD) -e "s,quay.io/open-cluster-management/registration,$(REGISTRATION_IMAGE)," deploy/cluster-manager/config/samples/operator_open-cluster-management_clustermanagers.cr.yaml | $(KUBECTL) apply -f -
|
||||
|
||||
clean-hub: ensure-operator-sdk
|
||||
$(KUBECTL) delete -f deploy/cluster-manager/crds/operator_open-cluster-management_clustermanagers.cr.yaml --ignore-not-found
|
||||
$(OPERATOR_SDK) cleanup --olm --operator-namespace open-cluster-management --operator-version $(CSV_VERSION) --manifests deploy/cluster-manager/olm-catalog/cluster-manager --olm-namespace $(OLM_NAMESPACE) --timeout 10m
|
||||
$(KUBECTL) delete -f deploy/cluster-manager/config/samples/operator_open-cluster-management_clustermanagers.cr.yaml --ignore-not-found
|
||||
$(OPERATOR_SDK) cleanup cluster-manager --namespace open-cluster-management --timeout 10m
|
||||
|
||||
cluster-ip:
|
||||
CLUSTER_IP?=$(shell $(KUBECTL) get svc kubernetes -n default -o jsonpath="{.spec.clusterIP}")
|
||||
@@ -127,14 +135,14 @@ e2e-bootstrap-secret: cluster-ip
|
||||
deploy-spoke: deploy-spoke-operator apply-spoke-cr
|
||||
|
||||
deploy-spoke-operator: install-olm munge-spoke-csv bootstrap-secret
|
||||
$(OPERATOR_SDK) run --olm --operator-namespace open-cluster-management --operator-version $(CSV_VERSION) --manifests deploy/klusterlet/olm-catalog/klusterlet --olm-namespace $(OLM_NAMESPACE) --timeout 10m
|
||||
$(OPERATOR_SDK) run packagemanifests deploy/klusterlet/olm-catalog/klusterlet/ --namespace open-cluster-management --version $(CSV_VERSION) --install-mode SingleNamespace=open-cluster-management --timeout=10m
|
||||
|
||||
apply-spoke-cr:
|
||||
$(SED_CMD) -e "s,quay.io/open-cluster-management/registration,$(REGISTRATION_IMAGE)," -e "s,quay.io/open-cluster-management/work,$(WORK_IMAGE)," deploy/klusterlet/crds/operator_open-cluster-management_klusterlets.cr.yaml | $(KUBECTL) apply -f -
|
||||
$(SED_CMD) -e "s,quay.io/open-cluster-management/registration,$(REGISTRATION_IMAGE)," -e "s,quay.io/open-cluster-management/work,$(WORK_IMAGE)," deploy/klusterlet/config/samples/operator_open-cluster-management_klusterlets.cr.yaml | $(KUBECTL) apply -f -
|
||||
|
||||
clean-spoke: ensure-operator-sdk
|
||||
$(KUBECTL) delete -f deploy/klusterlet/crds/operator_open-cluster-management_klusterlets.cr.yaml --ignore-not-found
|
||||
$(OPERATOR_SDK) cleanup --olm --operator-namespace open-cluster-management --operator-version $(CSV_VERSION) --manifests deploy/klusterlet/olm-catalog/klusterlet --olm-namespace $(OLM_NAMESPACE) --timeout 10m
|
||||
$(KUBECTL) delete -f deploy/klusterlet/config/samples/operator_open-cluster-management_klusterlets.cr.yaml --ignore-not-found
|
||||
$(OPERATOR_SDK) cleanup klusterlet --namespace open-cluster-management --timeout 10m
|
||||
|
||||
test-e2e: deploy-hub deploy-spoke-operator run-e2e
|
||||
|
||||
|
||||
2
deploy/cluster-manager/PROJECT
Normal file
2
deploy/cluster-manager/PROJECT
Normal file
@@ -0,0 +1,2 @@
|
||||
projectName: cluster-manager
|
||||
version: 2
|
||||
2
deploy/cluster-manager/config/crds/kustomization.yaml
Normal file
2
deploy/cluster-manager/config/crds/kustomization.yaml
Normal file
@@ -0,0 +1,2 @@
|
||||
resources:
|
||||
- 0000_01_operator.open-cluster-management.io_clustermanagers.crd.yaml
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,4 @@
|
||||
bases:
|
||||
- ../crds
|
||||
- ../rbac
|
||||
- ../operator
|
||||
@@ -0,0 +1,4 @@
|
||||
resources:
|
||||
- namespace.yaml
|
||||
- service_account.yaml
|
||||
- operator.yaml
|
||||
4
deploy/cluster-manager/config/operator/namespace.yaml
Normal file
4
deploy/cluster-manager/config/operator/namespace.yaml
Normal file
@@ -0,0 +1,4 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: open-cluster-management
|
||||
3
deploy/cluster-manager/config/rbac/kustomization.yaml
Normal file
3
deploy/cluster-manager/config/rbac/kustomization.yaml
Normal file
@@ -0,0 +1,3 @@
|
||||
resources:
|
||||
- cluster_role.yaml
|
||||
- cluster_role_binding.yaml
|
||||
2
deploy/cluster-manager/config/samples/kustomization.yaml
Normal file
2
deploy/cluster-manager/config/samples/kustomization.yaml
Normal file
@@ -0,0 +1,2 @@
|
||||
resources:
|
||||
- operator_open-cluster-management_clustermanagers.cr.yaml
|
||||
File diff suppressed because one or more lines are too long
@@ -1,5 +1,5 @@
|
||||
channels:
|
||||
- name: stable
|
||||
currentCSV: cluster-manager.v0.2.0
|
||||
currentCSV: cluster-manager.v0.3.0
|
||||
defaultChannel: stable
|
||||
packageName: cluster-manager
|
||||
@@ -19,19 +19,20 @@ metadata:
|
||||
capabilities: Basic Install
|
||||
categories: Integration & Delivery,OpenShift Optional
|
||||
certified: "false"
|
||||
containerImage: quay.io/repository/open-cluster-management/registration-operator:0.0.2
|
||||
createdAt: "2020-07-30T20:00:31Z"
|
||||
containerImage: quay.io/repository/open-cluster-management/registration-operator:latest
|
||||
createdAt: "2020-10-15T20:00:31Z"
|
||||
description: Manages the installation and upgrade of the ClusterManager.
|
||||
operators.operatorframework.io/builder: operator-sdk-v1.0.1
|
||||
operators.operatorframework.io/project_layout: go
|
||||
repository: https://github.com/open-cluster-management/registration-operator
|
||||
support: Red Hat, Inc.
|
||||
name: cluster-manager.v0.2.0
|
||||
name: cluster-manager.v0.3.0
|
||||
namespace: placeholder
|
||||
spec:
|
||||
apiservicedefinitions: {}
|
||||
customresourcedefinitions:
|
||||
owned:
|
||||
- description: ClusterManager defines the configurations of controllers running
|
||||
hub that govern registration and work distribution for attached Klusterlets
|
||||
- description: ClusterManager defines the configurations of controllers running hub that govern registration and work distribution for attached Klusterlets
|
||||
displayName: ClusterManager
|
||||
kind: ClusterManager
|
||||
name: clustermanagers.operator.open-cluster-management.io
|
||||
@@ -255,6 +256,9 @@ spec:
|
||||
cpu: 100m
|
||||
memory: 128Mi
|
||||
serviceAccountName: cluster-manager
|
||||
permissions:
|
||||
- rules: []
|
||||
serviceAccountName: cluster-manager
|
||||
strategy: deployment
|
||||
installModes:
|
||||
- supported: true
|
||||
@@ -281,8 +285,8 @@ spec:
|
||||
maturity: alpha
|
||||
provider:
|
||||
name: Red Hat, Inc.
|
||||
replaces: cluster-manager.v0.1.0
|
||||
replaces: cluster-manager.v0.2.0
|
||||
selector:
|
||||
matchLabels:
|
||||
app: cluster-manager
|
||||
version: 0.2.0
|
||||
version: 0.3.0
|
||||
|
||||
@@ -0,0 +1,150 @@
|
||||
apiVersion: apiextensions.k8s.io/v1beta1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
name: clustermanagers.operator.open-cluster-management.io
|
||||
spec:
|
||||
group: operator.open-cluster-management.io
|
||||
names:
|
||||
kind: ClusterManager
|
||||
listKind: ClusterManagerList
|
||||
plural: clustermanagers
|
||||
singular: clustermanager
|
||||
preserveUnknownFields: false
|
||||
scope: Cluster
|
||||
subresources:
|
||||
status: {}
|
||||
validation:
|
||||
openAPIV3Schema:
|
||||
description: ClusterManager configures the controllers on the hub that govern registration and work distribution for attached Klusterlets. ClusterManager will be only deployed in open-cluster-management-hub namespace.
|
||||
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 deployment configuration of controllers that govern registration and work distribution for attached Klusterlets.
|
||||
properties:
|
||||
registrationImagePullSpec:
|
||||
description: RegistrationImagePullSpec represents the desired image of registration controller/webhook installed on hub.
|
||||
type: string
|
||||
workImagePullSpec:
|
||||
description: WorkImagePullSpec represents the desired image configuration of work controller/webhook installed on hub.
|
||||
type: string
|
||||
type: object
|
||||
status:
|
||||
description: Status represents the current status of controllers that govern the lifecycle of managed clusters.
|
||||
properties:
|
||||
conditions:
|
||||
description: 'Conditions contain the different condition statuses for this ClusterManager. Valid condition types are: Applied: components in hub are applied. Available: components in hub are available and ready to serve. Progressing: components in hub are in a transitioning state. Degraded: components in hub do not match the desired configuration and only provide degraded service.'
|
||||
items:
|
||||
description: "Condition contains details for one aspect of the current state of this API Resource. --- This struct is intended for direct use as an array at the field path .status.conditions. For example, type FooStatus struct{ // Represents the observations of a foo's current state. // Known .status.conditions.type are: \"Available\", \"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge // +listType=map // +listMapKey=type Conditions []metav1.Condition `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }"
|
||||
properties:
|
||||
lastTransitionTime:
|
||||
description: lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.
|
||||
format: date-time
|
||||
type: string
|
||||
message:
|
||||
description: message is a human readable message indicating details about the transition. This may be an empty string.
|
||||
maxLength: 32768
|
||||
type: string
|
||||
observedGeneration:
|
||||
description: observedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance.
|
||||
format: int64
|
||||
minimum: 0
|
||||
type: integer
|
||||
reason:
|
||||
description: reason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty.
|
||||
maxLength: 1024
|
||||
minLength: 1
|
||||
pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
|
||||
type: string
|
||||
status:
|
||||
description: status of the condition, one of True, False, Unknown.
|
||||
enum:
|
||||
- "True"
|
||||
- "False"
|
||||
- Unknown
|
||||
type: string
|
||||
type:
|
||||
description: type of condition in CamelCase or in foo.example.com/CamelCase. --- Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be useful (see .node.status.conditions), the ability to deconflict is important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)
|
||||
maxLength: 316
|
||||
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
|
||||
type: string
|
||||
required:
|
||||
- lastTransitionTime
|
||||
- message
|
||||
- reason
|
||||
- status
|
||||
- type
|
||||
type: object
|
||||
type: array
|
||||
generations:
|
||||
description: Generations are used to determine when an item needs to be reconciled or has changed in a way that needs a reaction.
|
||||
items:
|
||||
description: GenerationStatus keeps track of the generation for a given resource so that decisions about forced updates can be made. the definition matches the GenerationStatus defined in github.com/openshift/api/v1
|
||||
properties:
|
||||
group:
|
||||
description: group is the group of the thing you're tracking
|
||||
type: string
|
||||
lastGeneration:
|
||||
description: lastGeneration is the last generation of the thing that controller applies
|
||||
format: int64
|
||||
type: integer
|
||||
name:
|
||||
description: name is the name of the thing you're tracking
|
||||
type: string
|
||||
namespace:
|
||||
description: namespace is where the thing you're tracking is
|
||||
type: string
|
||||
resource:
|
||||
description: resource is the resource type of the thing you're tracking
|
||||
type: string
|
||||
version:
|
||||
description: version is the version of the thing you're tracking
|
||||
type: string
|
||||
type: object
|
||||
type: array
|
||||
observedGeneration:
|
||||
description: ObservedGeneration is the last generation change you've dealt with
|
||||
format: int64
|
||||
type: integer
|
||||
relatedResources:
|
||||
description: RelatedResources are used to track the resources that are related to this ClusterManager
|
||||
items:
|
||||
description: RelatedResourceMeta represents the resource that is managed by an operator
|
||||
properties:
|
||||
group:
|
||||
description: group is the group of the thing you're tracking
|
||||
type: string
|
||||
name:
|
||||
description: name is the name of the thing you're tracking
|
||||
type: string
|
||||
namespace:
|
||||
description: namespace is where the thing you're tracking is
|
||||
type: string
|
||||
resource:
|
||||
description: resource is the resource type of the thing you're tracking
|
||||
type: string
|
||||
version:
|
||||
description: version is the version of the thing you're tracking
|
||||
type: string
|
||||
type: object
|
||||
type: array
|
||||
type: object
|
||||
type: object
|
||||
version: v1
|
||||
versions:
|
||||
- name: v1
|
||||
served: true
|
||||
storage: true
|
||||
status:
|
||||
acceptedNames:
|
||||
kind: ""
|
||||
plural: ""
|
||||
conditions: []
|
||||
storedVersions: []
|
||||
2
deploy/klusterlet/PROJECT
Normal file
2
deploy/klusterlet/PROJECT
Normal file
@@ -0,0 +1,2 @@
|
||||
projectName: klusterlet
|
||||
version: 2
|
||||
2
deploy/klusterlet/config/crds/kustomization.yaml
Normal file
2
deploy/klusterlet/config/crds/kustomization.yaml
Normal file
@@ -0,0 +1,2 @@
|
||||
resources:
|
||||
- 0000_00_operator.open-cluster-management.io_klusterlets.crd.yaml
|
||||
File diff suppressed because one or more lines are too long
4
deploy/klusterlet/config/manifests/kustomization.yaml
Normal file
4
deploy/klusterlet/config/manifests/kustomization.yaml
Normal file
@@ -0,0 +1,4 @@
|
||||
bases:
|
||||
- ../crds
|
||||
- ../rbac
|
||||
- ../operator
|
||||
4
deploy/klusterlet/config/operator/kustomization.yaml
Normal file
4
deploy/klusterlet/config/operator/kustomization.yaml
Normal file
@@ -0,0 +1,4 @@
|
||||
resources:
|
||||
- namespace.yaml
|
||||
- service_account.yaml
|
||||
- operator.yaml
|
||||
4
deploy/klusterlet/config/operator/namespace.yaml
Normal file
4
deploy/klusterlet/config/operator/namespace.yaml
Normal file
@@ -0,0 +1,4 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: open-cluster-management
|
||||
3
deploy/klusterlet/config/rbac/kustomization.yaml
Normal file
3
deploy/klusterlet/config/rbac/kustomization.yaml
Normal file
@@ -0,0 +1,3 @@
|
||||
resources:
|
||||
- cluster_role.yaml
|
||||
- cluster_role_binding.yaml
|
||||
2
deploy/klusterlet/config/samples/kustomization.yaml
Normal file
2
deploy/klusterlet/config/samples/kustomization.yaml
Normal file
@@ -0,0 +1,2 @@
|
||||
resources:
|
||||
- operator_open-cluster-management_klusterlets.cr.yaml
|
||||
File diff suppressed because one or more lines are too long
@@ -1,5 +1,5 @@
|
||||
channels:
|
||||
- currentCSV: klusterlet.v0.2.0
|
||||
- currentCSV: klusterlet.v0.3.0
|
||||
name: stable
|
||||
defaultChannel: stable
|
||||
packageName: klusterlet
|
||||
|
||||
@@ -26,19 +26,20 @@ metadata:
|
||||
capabilities: Basic Install
|
||||
categories: Integration & Delivery,OpenShift Optional
|
||||
certified: "false"
|
||||
containerImage: quay.io/repository/open-cluster-management/registration-operator:0.0.2
|
||||
createdAt: "2020-07-30T20:00:31Z"
|
||||
containerImage: quay.io/repository/open-cluster-management/registration-operator:latest
|
||||
createdAt: "2020-10-15T20:00:31Z"
|
||||
description: Manages the installation and upgrade of the Klusterlet.
|
||||
operators.operatorframework.io/builder: operator-sdk-v1.0.1
|
||||
operators.operatorframework.io/project_layout: go
|
||||
repository: https://github.com/open-cluster-management/registration-operator
|
||||
support: Red Hat, Inc.
|
||||
name: klusterlet.v0.2.0
|
||||
name: klusterlet.v0.3.0
|
||||
namespace: placeholder
|
||||
spec:
|
||||
apiservicedefinitions: {}
|
||||
customresourcedefinitions:
|
||||
owned:
|
||||
- description: Klusterlet defines the configurations of agents running on the
|
||||
managed cluster
|
||||
- description: Klusterlet defines the configurations of agents running on the managed cluster
|
||||
displayName: Klusterlet
|
||||
kind: Klusterlet
|
||||
name: klusterlets.operator.open-cluster-management.io
|
||||
@@ -256,6 +257,9 @@ spec:
|
||||
cpu: 100m
|
||||
memory: 128Mi
|
||||
serviceAccountName: klusterlet
|
||||
permissions:
|
||||
- rules: []
|
||||
serviceAccountName: klusterlet
|
||||
strategy: deployment
|
||||
installModes:
|
||||
- supported: true
|
||||
@@ -286,4 +290,4 @@ spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: klusterlet
|
||||
version: 0.2.0
|
||||
version: 0.3.0
|
||||
|
||||
@@ -0,0 +1,170 @@
|
||||
apiVersion: apiextensions.k8s.io/v1beta1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
name: klusterlets.operator.open-cluster-management.io
|
||||
spec:
|
||||
group: operator.open-cluster-management.io
|
||||
names:
|
||||
kind: Klusterlet
|
||||
listKind: KlusterletList
|
||||
plural: klusterlets
|
||||
singular: klusterlet
|
||||
preserveUnknownFields: false
|
||||
scope: Cluster
|
||||
subresources:
|
||||
status: {}
|
||||
validation:
|
||||
openAPIV3Schema:
|
||||
description: Klusterlet represents controllers on the managed cluster. When configured, the Klusterlet requires a secret named of bootstrap-hub-kubeconfig in the same namespace to allow API requests to the hub for the registration protocol.
|
||||
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 the desired deployment configuration of Klusterlet agent.
|
||||
properties:
|
||||
clusterName:
|
||||
description: ClusterName is the name of the managed cluster to be created on hub. The Klusterlet agent generates a random name if it is not set, or discovers the appropriate cluster name on openshift.
|
||||
type: string
|
||||
externalServerURLs:
|
||||
description: ExternalServerURLs represents the a list of apiserver urls and ca bundles that is accessible externally If it is set empty, managed cluster has no externally accessible url that hub cluster can visit.
|
||||
items:
|
||||
description: ServerURL represents the apiserver url and ca bundle that is accessible externally
|
||||
properties:
|
||||
caBundle:
|
||||
description: CABundle is the ca bundle to connect to apiserver of the managed cluster. System certs are used if it is not set.
|
||||
format: byte
|
||||
type: string
|
||||
url:
|
||||
description: URL is the url of apiserver endpoint of the managed cluster.
|
||||
type: string
|
||||
type: object
|
||||
type: array
|
||||
namespace:
|
||||
description: Namespace is the namespace to deploy the agent. The namespace must have a prefix of "open-cluster-management-", and if it is not set, the namespace of "open-cluster-management-agent" is used to deploy agent.
|
||||
type: string
|
||||
registrationImagePullSpec:
|
||||
description: RegistrationImagePullSpec represents the desired image configuration of registration agent.
|
||||
type: string
|
||||
workImagePullSpec:
|
||||
description: WorkImagePullSpec represents the desired image configuration of work agent.
|
||||
type: string
|
||||
type: object
|
||||
status:
|
||||
description: Status represents the current status of Klusterlet agent.
|
||||
properties:
|
||||
conditions:
|
||||
description: 'Conditions contain the different condition statuses for this Klusterlet. Valid condition types are: Applied: components have been applied in the managed cluster. Available: components in the managed cluster are available and ready to serve. Progressing: components in the managed cluster are in a transitioning state. Degraded: components in the managed cluster do not match the desired configuration and only provide degraded service.'
|
||||
items:
|
||||
description: "Condition contains details for one aspect of the current state of this API Resource. --- This struct is intended for direct use as an array at the field path .status.conditions. For example, type FooStatus struct{ // Represents the observations of a foo's current state. // Known .status.conditions.type are: \"Available\", \"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge // +listType=map // +listMapKey=type Conditions []metav1.Condition `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }"
|
||||
properties:
|
||||
lastTransitionTime:
|
||||
description: lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.
|
||||
format: date-time
|
||||
type: string
|
||||
message:
|
||||
description: message is a human readable message indicating details about the transition. This may be an empty string.
|
||||
maxLength: 32768
|
||||
type: string
|
||||
observedGeneration:
|
||||
description: observedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance.
|
||||
format: int64
|
||||
minimum: 0
|
||||
type: integer
|
||||
reason:
|
||||
description: reason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty.
|
||||
maxLength: 1024
|
||||
minLength: 1
|
||||
pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
|
||||
type: string
|
||||
status:
|
||||
description: status of the condition, one of True, False, Unknown.
|
||||
enum:
|
||||
- "True"
|
||||
- "False"
|
||||
- Unknown
|
||||
type: string
|
||||
type:
|
||||
description: type of condition in CamelCase or in foo.example.com/CamelCase. --- Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be useful (see .node.status.conditions), the ability to deconflict is important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)
|
||||
maxLength: 316
|
||||
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
|
||||
type: string
|
||||
required:
|
||||
- lastTransitionTime
|
||||
- message
|
||||
- reason
|
||||
- status
|
||||
- type
|
||||
type: object
|
||||
type: array
|
||||
generations:
|
||||
description: Generations are used to determine when an item needs to be reconciled or has changed in a way that needs a reaction.
|
||||
items:
|
||||
description: GenerationStatus keeps track of the generation for a given resource so that decisions about forced updates can be made. the definition matches the GenerationStatus defined in github.com/openshift/api/v1
|
||||
properties:
|
||||
group:
|
||||
description: group is the group of the thing you're tracking
|
||||
type: string
|
||||
lastGeneration:
|
||||
description: lastGeneration is the last generation of the thing that controller applies
|
||||
format: int64
|
||||
type: integer
|
||||
name:
|
||||
description: name is the name of the thing you're tracking
|
||||
type: string
|
||||
namespace:
|
||||
description: namespace is where the thing you're tracking is
|
||||
type: string
|
||||
resource:
|
||||
description: resource is the resource type of the thing you're tracking
|
||||
type: string
|
||||
version:
|
||||
description: version is the version of the thing you're tracking
|
||||
type: string
|
||||
type: object
|
||||
type: array
|
||||
observedGeneration:
|
||||
description: ObservedGeneration is the last generation change you've dealt with
|
||||
format: int64
|
||||
type: integer
|
||||
relatedResources:
|
||||
description: RelatedResources are used to track the resources that are related to this Klusterlet
|
||||
items:
|
||||
description: RelatedResourceMeta represents the resource that is managed by an operator
|
||||
properties:
|
||||
group:
|
||||
description: group is the group of the thing you're tracking
|
||||
type: string
|
||||
name:
|
||||
description: name is the name of the thing you're tracking
|
||||
type: string
|
||||
namespace:
|
||||
description: namespace is where the thing you're tracking is
|
||||
type: string
|
||||
resource:
|
||||
description: resource is the resource type of the thing you're tracking
|
||||
type: string
|
||||
version:
|
||||
description: version is the version of the thing you're tracking
|
||||
type: string
|
||||
type: object
|
||||
type: array
|
||||
type: object
|
||||
type: object
|
||||
version: v1
|
||||
versions:
|
||||
- name: v1
|
||||
served: true
|
||||
storage: true
|
||||
status:
|
||||
acceptedNames:
|
||||
kind: ""
|
||||
plural: ""
|
||||
conditions: []
|
||||
storedVersions: []
|
||||
@@ -12,5 +12,5 @@ do
|
||||
cp $f ./manifests/klusterlet/
|
||||
done
|
||||
|
||||
cp $CLUSTER_MANAGER_CRD_FILE ./deploy/cluster-manager/crds/
|
||||
cp $KLUSTERLET_CRD_FILE ./deploy/klusterlet/crds/
|
||||
cp $CLUSTER_MANAGER_CRD_FILE ./deploy/cluster-manager/config/crds/
|
||||
cp $KLUSTERLET_CRD_FILE ./deploy/klusterlet/config/crds/
|
||||
|
||||
@@ -12,6 +12,6 @@ do
|
||||
diff -N $f ./manifests/klusterlet/$(basename $f) || ( echo 'crd content is incorrect' && false )
|
||||
done
|
||||
|
||||
diff -N $CLUSTER_MANAGER_CRD_FILE ./deploy/cluster-manager/crds/$(basename $CLUSTER_MANAGER_CRD_FILE) || ( echo 'crd content is incorrect' && false )
|
||||
diff -N $KLUSTERLET_CRD_FILE ./deploy/klusterlet/crds/$(basename $KLUSTERLET_CRD_FILE) || ( echo 'crd content is incorrect' && false )
|
||||
diff -N $CLUSTER_MANAGER_CRD_FILE ./deploy/cluster-manager/config/crds/$(basename $CLUSTER_MANAGER_CRD_FILE) || ( echo 'crd content is incorrect' && false )
|
||||
diff -N $KLUSTERLET_CRD_FILE ./deploy/klusterlet/config/crds/$(basename $KLUSTERLET_CRD_FILE) || ( echo 'crd content is incorrect' && false )
|
||||
|
||||
|
||||
Reference in New Issue
Block a user