diff --git a/go.mod b/go.mod index aaa7c446c..c3ccf35aa 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/K0rdent/kcm -go 1.23.5 +go 1.23.6 require ( github.com/Masterminds/semver/v3 v3.3.1 @@ -15,8 +15,8 @@ require ( github.com/onsi/ginkgo/v2 v2.22.2 github.com/onsi/gomega v1.36.2 github.com/opencontainers/go-digest v1.0.1-0.20231025023718-d50d2fec9c98 - github.com/projectsveltos/addon-controller v0.47.0 - github.com/projectsveltos/libsveltos v0.48.1 + github.com/projectsveltos/addon-controller v0.49.0 + github.com/projectsveltos/libsveltos v0.49.0 github.com/robfig/cron/v3 v3.0.1 github.com/segmentio/analytics-go v3.1.0+incompatible github.com/stretchr/testify v1.10.0 @@ -57,7 +57,7 @@ require ( github.com/dariubs/percent v1.0.0 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/distribution/reference v0.6.0 // indirect - github.com/docker/cli v27.5.1+incompatible // indirect + github.com/docker/cli v28.0.0+incompatible // indirect github.com/docker/distribution v2.8.3+incompatible // indirect github.com/docker/docker v27.5.0+incompatible // indirect github.com/docker/docker-credential-helpers v0.8.2 // indirect diff --git a/go.sum b/go.sum index 6bf8c9cb7..2515302ac 100644 --- a/go.sum +++ b/go.sum @@ -92,8 +92,8 @@ github.com/distribution/distribution/v3 v3.0.0-beta.1 h1:X+ELTxPuZ1Xe5MsD3kp2wfG github.com/distribution/distribution/v3 v3.0.0-beta.1/go.mod h1:O9O8uamhHzWWQVTjuQpyYUVm/ShPHPUDgvQMpHGVBDs= github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk= github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= -github.com/docker/cli v27.5.1+incompatible h1:JB9cieUT9YNiMITtIsguaN55PLOHhBSz3LKVc6cqWaY= -github.com/docker/cli v27.5.1+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= +github.com/docker/cli v28.0.0+incompatible h1:ido37VmLUqEp+5NFb9icd6BuBB+SNDgCn+5kPCr2buA= +github.com/docker/cli v28.0.0+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= github.com/docker/distribution v2.8.3+incompatible h1:AtKxIZ36LoNK51+Z6RpzLpddBirtxJnzDrHLEKxTAYk= github.com/docker/distribution v2.8.3+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/docker v27.5.0+incompatible h1:um++2NcQtGRTz5eEgO6aJimo6/JxrTXC941hd05JO6U= @@ -363,10 +363,10 @@ github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRI github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/poy/onpar v1.1.2 h1:QaNrNiZx0+Nar5dLgTVp5mXkyoVFIbepjyEoGSnhbAY= github.com/poy/onpar v1.1.2/go.mod h1:6X8FLNoxyr9kkmnlqpK6LSoiOtrO6MICtWwEuWkLjzg= -github.com/projectsveltos/addon-controller v0.47.0 h1:axcVAWm9roWanSDzlwRssFaDrbj35VACBQZsx1PXgfc= -github.com/projectsveltos/addon-controller v0.47.0/go.mod h1:IiPpyXpT7EF7AJspas99+lNnKffQoNxuNnrTg61lAdE= -github.com/projectsveltos/libsveltos v0.48.1 h1:SWtACXeVNehWNxh/jEeFB/Z1QqMd4HeSh5Z60czwJbQ= -github.com/projectsveltos/libsveltos v0.48.1/go.mod h1:9z2AUhSE2qzi+m5tqeQUMm+c4whMtbKH6oYOYY+0tbw= +github.com/projectsveltos/addon-controller v0.49.0 h1:y5+SgkmTBrW4fftV8vINVdG8XA9UXO+qQv3J3xC1SIs= +github.com/projectsveltos/addon-controller v0.49.0/go.mod h1:F9d+6kJ20nSBoGQQ3nmiyfJ5jIvqwRdeQuRfOh7mnsY= +github.com/projectsveltos/libsveltos v0.49.0 h1:mzbEzN1Ruu7lZ918gijf5mzG3QTGETaZ5doIu6iTH7U= +github.com/projectsveltos/libsveltos v0.49.0/go.mod h1:xne9qc5+gVpvTwJ7cXORfS2FRo27az2LDQY3oNTWY9M= github.com/projectsveltos/lua-utils/glua-json v0.0.0-20250215155204-2e8364e9ce73 h1:Sgh71mZil6CXZXcRPrzfl7XuetK+CyvruWOajU95qhs= github.com/projectsveltos/lua-utils/glua-json v0.0.0-20250215155204-2e8364e9ce73/go.mod h1:AIzg+JWbfrFWazyM5Ka2fX69r9aFr3+o2Mvn9SfKDYU= github.com/projectsveltos/lua-utils/glua-runes v0.0.0-20250215155204-2e8364e9ce73 h1:VdjrXW3hU6JPP9kUtUC6K8ulW82uAjPyiMKf4iJGIXg= diff --git a/templates/provider/kcm-templates/files/release.yaml b/templates/provider/kcm-templates/files/release.yaml index baf96ec0c..be5152e9c 100644 --- a/templates/provider/kcm-templates/files/release.yaml +++ b/templates/provider/kcm-templates/files/release.yaml @@ -24,4 +24,4 @@ spec: - name: cluster-api-provider-docker template: cluster-api-provider-docker-0-1-0 - name: projectsveltos - template: projectsveltos-0-47-0 + template: projectsveltos-0-49-0 diff --git a/templates/provider/kcm-templates/files/templates/projectsveltos.yaml b/templates/provider/kcm-templates/files/templates/projectsveltos.yaml index 17150f4fb..31a8ad79b 100644 --- a/templates/provider/kcm-templates/files/templates/projectsveltos.yaml +++ b/templates/provider/kcm-templates/files/templates/projectsveltos.yaml @@ -1,14 +1,14 @@ apiVersion: k0rdent.mirantis.com/v1alpha1 kind: ProviderTemplate metadata: - name: projectsveltos-0-47-0 + name: projectsveltos-0-49-0 annotations: helm.sh/resource-policy: keep spec: helm: chartSpec: chart: projectsveltos - version: 0.47.0 + version: 0.49.0 interval: 10m0s sourceRef: kind: HelmRepository diff --git a/templates/provider/kcm/projectsveltos-crds/accessrequests.lib.projectsveltos.io.yaml b/templates/provider/kcm/projectsveltos-crds/accessrequests.lib.projectsveltos.io.yaml index 231465279..636657925 100644 --- a/templates/provider/kcm/projectsveltos-crds/accessrequests.lib.projectsveltos.io.yaml +++ b/templates/provider/kcm/projectsveltos-crds/accessrequests.lib.projectsveltos.io.yaml @@ -13,125 +13,6 @@ spec: singular: accessrequest scope: Namespaced versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - description: AccessRequest is the Schema for the accessrequest 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: AccessRequestSpec defines the desired state of AccessRequest - properties: - controlPlaneEndpoint: - description: |- - ControlPlaneEndpoint represents the endpoint used to communicate with the - management cluster controlplane endpoint. It will be used when generating the - kubeconfig. - properties: - host: - description: The hostname on which the API server is serving. - type: string - port: - description: The port on which the API server is serving. - format: int32 - type: integer - required: - - host - - port - type: object - name: - description: |- - Name is the name of the service account created - for this AccessRequest - type: string - namespace: - description: |- - Namespace is the namespace of the service account created - for this AccessRequest - type: string - type: - description: Type represent the type of the request - enum: - - SveltosAgent - - Different - type: string - required: - - controlPlaneEndpoint - - name - - namespace - - type - type: object - status: - description: AccessRequestStatus defines the status of AccessRequest - properties: - failureMessage: - description: FailureMessage provides more information if an error occurs. - type: string - secretRef: - description: SecretRef points to the Secret containing Kubeconfig - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: |- - If referring to a piece of an object instead of an entire object, this string - should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within a pod, this would take on a value like: - "spec.containers{name}" (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" (container with - index 2 in this pod). This syntax is chosen only to have some well-defined way of - referencing a part of an object. - type: string - kind: - description: |- - Kind of the referent. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - name: - description: |- - Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - namespace: - description: |- - Namespace of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - type: string - resourceVersion: - description: |- - Specific resourceVersion to which this reference is made, if any. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency - type: string - uid: - description: |- - UID of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - type: string - type: object - x-kubernetes-map-type: atomic - type: object - type: object - served: true - storage: false - subresources: - status: {} - name: v1beta1 schema: openAPIV3Schema: diff --git a/templates/provider/kcm/projectsveltos-crds/classifierreports.lib.projectsveltos.io.yaml b/templates/provider/kcm/projectsveltos-crds/classifierreports.lib.projectsveltos.io.yaml index 601a99a5a..905930284 100644 --- a/templates/provider/kcm/projectsveltos-crds/classifierreports.lib.projectsveltos.io.yaml +++ b/templates/provider/kcm/projectsveltos-crds/classifierreports.lib.projectsveltos.io.yaml @@ -14,76 +14,6 @@ spec: singular: classifierreport scope: Namespaced versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - description: ClassifierReport is the Schema for the classifierreports 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: - properties: - classifierName: - description: |- - ClassifierName is the name of the Classifier instance this report - is for. - type: string - clusterName: - description: |- - ClusterName is the name of the Cluster this ClusterReport - is for. - type: string - clusterNamespace: - description: |- - ClusterNamespace is the namespace of the Cluster this - ClusterReport is for. - type: string - clusterType: - description: ClusterType is the type of Cluster - type: string - match: - description: |- - Match indicates whether Cluster is currently a match for - the Classifier instance this report is for - type: boolean - required: - - classifierName - - clusterName - - clusterNamespace - - clusterType - - match - type: object - status: - description: ClassifierReportStatus defines the observed state of ClassifierReport - properties: - phase: - description: Phase represents the current phase of report. - enum: - - WaitingForDelivery - - Delivering - - Processed - type: string - type: object - type: object - served: true - storage: false - subresources: - status: {} - name: v1beta1 schema: openAPIV3Schema: diff --git a/templates/provider/kcm/projectsveltos-crds/classifiers.lib.projectsveltos.io.yaml b/templates/provider/kcm/projectsveltos-crds/classifiers.lib.projectsveltos.io.yaml index b6e0d6945..cae9814ba 100644 --- a/templates/provider/kcm/projectsveltos-crds/classifiers.lib.projectsveltos.io.yaml +++ b/templates/provider/kcm/projectsveltos-crds/classifiers.lib.projectsveltos.io.yaml @@ -14,320 +14,6 @@ spec: singular: classifier scope: Cluster versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - description: Classifier is the Schema for the classifiers 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: ClassifierSpec defines the desired state of Classifier - properties: - classifierLabels: - description: |- - ClassifierLabels is set of labels, key,value pair, that will be added to each - cluster matching Classifier instance - items: - properties: - key: - description: Key is the label key - type: string - value: - description: Value is the label value - type: string - required: - - key - - value - type: object - type: array - deployedResourceConstraint: - description: DeployedResourceConstraint allows to classify based on current deployed resources - properties: - aggregatedClassification: - description: |- - AggregatedClassification is optional and can be used to specify a Lua function - that will be used to further detect whether the subset of the resources - selected using the ResourceSelector field are a match for this Classifier. - The function will receive the array of resources selected by ResourceSelectors. - If this field is not specified, a cluster is a match for Classifier instance, - if all ResourceSelectors returns at least one match. - This field allows to perform more complex evaluation on the resources, looking - at all resources together. - This can be useful for more sophisticated tasks, such as identifying resources - that are related to each other or that have similar properties. - The Lua function must return a struct with: - - "matching" field: boolean indicating whether cluster is a match; - - "message" field: (optional) message. - type: string - resourceSelectors: - description: |- - ResourceSelectors identifies what resources to select - If no AggregatedClassification is specified, a cluster is - a match for Classifier instance, if all ResourceSelectors returns at - least one match. - items: - description: ResourceSelector defines what resources are a match - properties: - evaluate: - description: |- - Evaluate contains a function "evaluate" in lua language. - The function will be passed one of the object selected based on - above criteria. - Must return struct with field "matching" representing whether - object is a match and an optional "message" field. - type: string - group: - description: Group of the resource deployed in the Cluster. - type: string - kind: - description: Kind of the resource deployed in the Cluster. - minLength: 1 - type: string - labelFilters: - description: LabelFilters allows to filter resources based on current labels. - items: - properties: - key: - description: Key is the label key - type: string - operation: - description: Operation is the comparison operation - enum: - - Equal - - Different - type: string - value: - description: Value is the label value - type: string - required: - - key - - operation - - value - type: object - type: array - name: - description: Name of the resource deployed in the Cluster. - type: string - namespace: - description: |- - Namespace of the resource deployed in the Cluster. - Empty for resources scoped at cluster level. - type: string - version: - description: Version of the resource deployed in the Cluster. - type: string - required: - - group - - kind - - version - type: object - type: array - required: - - resourceSelectors - type: object - kubernetesVersionConstraints: - description: KubernetesVersionConstraints allows to classify based on current kubernetes version - items: - properties: - comparison: - description: Comparison indicate how to compare cluster kubernetes version with the specified version - enum: - - Equal - - NotEqual - - GreaterThan - - LessThan - - GreaterThanOrEqualTo - - LessThanOrEqualTo - type: string - version: - description: Version is the kubernetes version - type: string - required: - - comparison - - version - type: object - type: array - required: - - classifierLabels - type: object - status: - description: ClassifierStatus defines the observed state of Classifier - properties: - clusterInfo: - description: |- - ClusterInfo reference all the cluster-api Cluster where Classifier - has been/is being deployed - items: - properties: - cluster: - description: Cluster references the Cluster - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: |- - If referring to a piece of an object instead of an entire object, this string - should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within a pod, this would take on a value like: - "spec.containers{name}" (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" (container with - index 2 in this pod). This syntax is chosen only to have some well-defined way of - referencing a part of an object. - type: string - kind: - description: |- - Kind of the referent. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - name: - description: |- - Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - namespace: - description: |- - Namespace of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - type: string - resourceVersion: - description: |- - Specific resourceVersion to which this reference is made, if any. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency - type: string - uid: - description: |- - UID of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - type: string - type: object - x-kubernetes-map-type: atomic - failureMessage: - description: FailureMessage provides more information about the error. - type: string - hash: - description: |- - Hash represents the hash of the Classifier currently deployed - in the Cluster - format: byte - type: string - status: - description: Status represents the state of the feature in the workload cluster - enum: - - Provisioning - - Provisioned - - Failed - - Removing - - Removed - type: string - required: - - cluster - - hash - type: object - type: array - machingClusterStatuses: - description: |- - MatchingClusterRefs reference all the cluster-api Cluster currently matching - Classifier - items: - properties: - clusterRef: - description: ClusterRef references the matching Cluster - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: |- - If referring to a piece of an object instead of an entire object, this string - should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within a pod, this would take on a value like: - "spec.containers{name}" (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" (container with - index 2 in this pod). This syntax is chosen only to have some well-defined way of - referencing a part of an object. - type: string - kind: - description: |- - Kind of the referent. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - name: - description: |- - Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - namespace: - description: |- - Namespace of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - type: string - resourceVersion: - description: |- - Specific resourceVersion to which this reference is made, if any. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency - type: string - uid: - description: |- - UID of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - type: string - type: object - x-kubernetes-map-type: atomic - managedLabels: - description: |- - ManagedLabels indicates the labels being managed on - the cluster by this Classifier instance - items: - type: string - type: array - unManagedLabels: - description: |- - UnManagedLabel indicates the labels this Classifier instance - would like to manage but cannot because different instance is - already managing it - items: - properties: - failureMessage: - description: |- - FailureMessage is a human consumable message explaining the - misconfiguration - type: string - key: - description: |- - Key represents a label Classifier would like to manage - but cannot because currently managed by different instance - type: string - required: - - key - type: object - type: array - required: - - clusterRef - type: object - type: array - type: object - type: object - served: true - storage: false - subresources: - status: {} - name: v1beta1 schema: openAPIV3Schema: diff --git a/templates/provider/kcm/projectsveltos-crds/clusterconfigurations.config.projectsveltos.io.yaml b/templates/provider/kcm/projectsveltos-crds/clusterconfigurations.config.projectsveltos.io.yaml index 68a576e22..5e54c74bb 100644 --- a/templates/provider/kcm/projectsveltos-crds/clusterconfigurations.config.projectsveltos.io.yaml +++ b/templates/provider/kcm/projectsveltos-crds/clusterconfigurations.config.projectsveltos.io.yaml @@ -14,349 +14,6 @@ spec: singular: clusterconfiguration scope: Namespaced versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - description: ClusterConfiguration is the Schema for the clusterconfigurations 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 - status: - description: ClusterConfigurationStatus defines the observed state of ClusterConfiguration - properties: - clusterProfileResources: - description: |- - ClusterProfileResources is the list of resources currently deployed in a Cluster due - to ClusterProfiles - items: - description: |- - ClusterProfileResource keeps info on all of the resources deployed in this Cluster - due to a given ClusterProfile - properties: - Features: - description: |- - Features contains the list of policies deployed in the Cluster because - of a given feature - items: - properties: - charts: - description: Charts is a list of helm charts deployed in the Cluster. - items: - properties: - appVersion: - description: AppVersion is the version of the app deployed in the Cluster. - type: string - chartVersion: - description: ChartVersion is the version of the helm chart deployed in the Cluster. - type: string - icon: - description: The URL to an icon file. - type: string - lastAppliedTime: - description: LastAppliedTime identifies when this resource was last applied to the cluster. - format: date-time - type: string - namespace: - description: Namespace where chart is deployed in the Cluster. - type: string - releaseName: - description: ReleaseName name of the release deployed in the Cluster. - minLength: 1 - type: string - repoURL: - description: |- - RepoURL URL of the repo containing the helm chart deployed - in the Cluster. - minLength: 1 - type: string - required: - - chartVersion - - lastAppliedTime - - releaseName - - repoURL - type: object - type: array - featureID: - description: FeatureID is an indentifier of the feature whose status is reported - enum: - - Resources - - Helm - - Kustomize - type: string - resources: - description: Resources is a list of resources deployed in the Cluster. - items: - properties: - group: - description: Group of the resource deployed in the Cluster. - type: string - ignoreForConfigurationDrift: - default: false - description: |- - IgnoreForConfigurationDrift indicates to not track resource - for configuration drift detection. - This field has a meaning only when mode is ContinuousWithDriftDetection - type: boolean - kind: - description: Kind of the resource deployed in the Cluster. - minLength: 1 - type: string - lastAppliedTime: - description: LastAppliedTime identifies when this resource was last applied to the cluster. - format: date-time - type: string - name: - description: Name of the resource deployed in the Cluster. - minLength: 1 - type: string - namespace: - description: |- - Namespace of the resource deployed in the Cluster. - Empty for resources scoped at cluster level. - type: string - owner: - description: Owner is the list of ConfigMap/Secret containing this resource. - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: |- - If referring to a piece of an object instead of an entire object, this string - should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within a pod, this would take on a value like: - "spec.containers{name}" (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" (container with - index 2 in this pod). This syntax is chosen only to have some well-defined way of - referencing a part of an object. - type: string - kind: - description: |- - Kind of the referent. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - name: - description: |- - Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - namespace: - description: |- - Namespace of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - type: string - resourceVersion: - description: |- - Specific resourceVersion to which this reference is made, if any. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency - type: string - uid: - description: |- - UID of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - type: string - type: object - x-kubernetes-map-type: atomic - version: - description: Version of the resource deployed in the Cluster. - minLength: 1 - type: string - required: - - group - - kind - - name - - owner - - version - type: object - type: array - required: - - featureID - type: object - type: array - clusterProfileName: - description: ProfileName is the name of the ClusterProfile matching the Cluster. - type: string - required: - - clusterProfileName - type: object - type: array - profileResources: - description: |- - ProfileResources is the list of resources currently deployed in a Cluster due - to Profiles - items: - description: |- - ProfileResource keeps info on all of the resources deployed in this Cluster - due to a given Profile - properties: - Features: - description: |- - Features contains the list of policies deployed in the Cluster because - of a given feature - items: - properties: - charts: - description: Charts is a list of helm charts deployed in the Cluster. - items: - properties: - appVersion: - description: AppVersion is the version of the app deployed in the Cluster. - type: string - chartVersion: - description: ChartVersion is the version of the helm chart deployed in the Cluster. - type: string - icon: - description: The URL to an icon file. - type: string - lastAppliedTime: - description: LastAppliedTime identifies when this resource was last applied to the cluster. - format: date-time - type: string - namespace: - description: Namespace where chart is deployed in the Cluster. - type: string - releaseName: - description: ReleaseName name of the release deployed in the Cluster. - minLength: 1 - type: string - repoURL: - description: |- - RepoURL URL of the repo containing the helm chart deployed - in the Cluster. - minLength: 1 - type: string - required: - - chartVersion - - lastAppliedTime - - releaseName - - repoURL - type: object - type: array - featureID: - description: FeatureID is an indentifier of the feature whose status is reported - enum: - - Resources - - Helm - - Kustomize - type: string - resources: - description: Resources is a list of resources deployed in the Cluster. - items: - properties: - group: - description: Group of the resource deployed in the Cluster. - type: string - ignoreForConfigurationDrift: - default: false - description: |- - IgnoreForConfigurationDrift indicates to not track resource - for configuration drift detection. - This field has a meaning only when mode is ContinuousWithDriftDetection - type: boolean - kind: - description: Kind of the resource deployed in the Cluster. - minLength: 1 - type: string - lastAppliedTime: - description: LastAppliedTime identifies when this resource was last applied to the cluster. - format: date-time - type: string - name: - description: Name of the resource deployed in the Cluster. - minLength: 1 - type: string - namespace: - description: |- - Namespace of the resource deployed in the Cluster. - Empty for resources scoped at cluster level. - type: string - owner: - description: Owner is the list of ConfigMap/Secret containing this resource. - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: |- - If referring to a piece of an object instead of an entire object, this string - should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within a pod, this would take on a value like: - "spec.containers{name}" (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" (container with - index 2 in this pod). This syntax is chosen only to have some well-defined way of - referencing a part of an object. - type: string - kind: - description: |- - Kind of the referent. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - name: - description: |- - Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - namespace: - description: |- - Namespace of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - type: string - resourceVersion: - description: |- - Specific resourceVersion to which this reference is made, if any. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency - type: string - uid: - description: |- - UID of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - type: string - type: object - x-kubernetes-map-type: atomic - version: - description: Version of the resource deployed in the Cluster. - minLength: 1 - type: string - required: - - group - - kind - - name - - owner - - version - type: object - type: array - required: - - featureID - type: object - type: array - profileName: - description: ProfileName is the name of the Profile matching the Cluster. - type: string - required: - - profileName - type: object - type: array - type: object - type: object - served: true - storage: false - subresources: - status: {} - name: v1beta1 schema: openAPIV3Schema: diff --git a/templates/provider/kcm/projectsveltos-crds/clusterhealthchecks.lib.projectsveltos.io.yaml b/templates/provider/kcm/projectsveltos-crds/clusterhealthchecks.lib.projectsveltos.io.yaml index 4913dca5d..d77c86101 100644 --- a/templates/provider/kcm/projectsveltos-crds/clusterhealthchecks.lib.projectsveltos.io.yaml +++ b/templates/provider/kcm/projectsveltos-crds/clusterhealthchecks.lib.projectsveltos.io.yaml @@ -3,20 +3,9 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - cert-manager.io/inject-ca-from: projectsveltos/projectsveltos-serving-cert controller-gen.kubebuilder.io/version: v0.17.2 name: clusterhealthchecks.lib.projectsveltos.io spec: - conversion: - strategy: Webhook - webhook: - clientConfig: - service: - name: webhook-service - namespace: projectsveltos - path: /convert - conversionReviewVersions: - - v1 group: lib.projectsveltos.io names: kind: ClusterHealthCheck @@ -25,375 +14,6 @@ spec: singular: clusterhealthcheck scope: Cluster versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - description: ClusterHealthCheck is the Schema for the clusterhealthchecks 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: ClusterHealthCheckSpec defines the desired state of ClusterHealthCheck - properties: - clusterSelector: - description: ClusterSelector identifies clusters to associate to (Deprecated use selector instead). - type: string - livenessChecks: - description: |- - LivenessChecks is a list of source of liveness checks to evaluate. - Anytime one of those changes, notifications will be sent - items: - properties: - livenessSourceRef: - description: |- - LivenessSourceRef is a reference to a liveness-specific resource that holds - the details for the liveness check. - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: |- - If referring to a piece of an object instead of an entire object, this string - should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within a pod, this would take on a value like: - "spec.containers{name}" (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" (container with - index 2 in this pod). This syntax is chosen only to have some well-defined way of - referencing a part of an object. - type: string - kind: - description: |- - Kind of the referent. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - name: - description: |- - Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - namespace: - description: |- - Namespace of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - type: string - resourceVersion: - description: |- - Specific resourceVersion to which this reference is made, if any. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency - type: string - uid: - description: |- - UID of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - type: string - type: object - x-kubernetes-map-type: atomic - name: - description: |- - Name of the liveness check. - Must be a DNS_LABEL and unique within the ClusterHealthCheck. - type: string - type: - description: Type specifies the type of liveness - enum: - - Addons - - HealthCheck - type: string - required: - - name - - type - type: object - type: array - notifications: - description: Notification is a list of source of events to evaluate. - items: - properties: - name: - description: |- - Name of the notification check. - Must be a DNS_LABEL and unique within the ClusterHealthCheck. - type: string - notificationRef: - description: |- - NotificationRef is a reference to a notification-specific resource that holds - the details for the notification. - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: |- - If referring to a piece of an object instead of an entire object, this string - should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within a pod, this would take on a value like: - "spec.containers{name}" (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" (container with - index 2 in this pod). This syntax is chosen only to have some well-defined way of - referencing a part of an object. - type: string - kind: - description: |- - Kind of the referent. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - name: - description: |- - Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - namespace: - description: |- - Namespace of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - type: string - resourceVersion: - description: |- - Specific resourceVersion to which this reference is made, if any. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency - type: string - uid: - description: |- - UID of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - type: string - type: object - x-kubernetes-map-type: atomic - type: - description: NotificationType specifies the type of notification - enum: - - KubernetesEvent - - Slack - - Webex - - Discord - - Teams - type: string - required: - - name - - type - type: object - type: array - required: - - clusterSelector - - livenessChecks - - notifications - type: object - status: - properties: - clusterCondition: - description: |- - ClusterConditions contains conditions and notification status for all clusters - matching ClusterHealthCheck instance - items: - properties: - clusterInfo: - properties: - cluster: - description: Cluster references the Cluster - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: |- - If referring to a piece of an object instead of an entire object, this string - should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within a pod, this would take on a value like: - "spec.containers{name}" (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" (container with - index 2 in this pod). This syntax is chosen only to have some well-defined way of - referencing a part of an object. - type: string - kind: - description: |- - Kind of the referent. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - name: - description: |- - Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - namespace: - description: |- - Namespace of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - type: string - resourceVersion: - description: |- - Specific resourceVersion to which this reference is made, if any. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency - type: string - uid: - description: |- - UID of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - type: string - type: object - x-kubernetes-map-type: atomic - failureMessage: - description: FailureMessage provides more information about the error. - type: string - hash: - description: |- - Hash represents the hash of the Classifier currently deployed - in the Cluster - format: byte - type: string - status: - description: Status represents the state of the feature in the workload cluster - enum: - - Provisioning - - Provisioned - - Failed - - Removing - - Removed - type: string - required: - - cluster - - hash - type: object - conditions: - description: Cluster conditions. - items: - description: Condition defines an observation of a Cluster API resource operational state. - properties: - lastTransitionTime: - description: |- - 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: |- - A human readable message indicating details about the transition. - This field may be empty. - type: string - name: - description: Condition name - type: string - reason: - description: |- - The reason for the condition's last transition in CamelCase. - The specific API may choose whether or not this field is considered a guaranteed API. - This field may not be empty. - type: string - severity: - description: |- - Severity provides an explicit classification of Reason code, so the users or machines can immediately - understand the current situation and act accordingly. - The Severity field MUST be set only when Status=False. - type: string - status: - description: Status of the condition, one of True, False, Unknown. - type: string - type: - description: Type of condition in CamelCase or in foo.example.com/CamelCase. - type: string - required: - - lastTransitionTime - - name - - status - - type - type: object - type: array - notificationSummaries: - description: NotificationSummaries contains status information on notifications - items: - properties: - failureMessage: - description: |- - FailureMessage is a human consumable message explaining the - misconfiguration - type: string - name: - description: Name of the notification check. - type: string - status: - description: NotificationStatus specifies the notification status - enum: - - Delivered - - FailedToDeliver - type: string - required: - - name - - status - type: object - type: array - required: - - clusterInfo - type: object - type: array - matchingClusters: - description: |- - MatchingClusterRefs reference all the clusters currently matching - ClusterHealthCheck ClusterSelector - items: - description: ObjectReference contains enough information to let you inspect or modify the referred object. - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: |- - If referring to a piece of an object instead of an entire object, this string - should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within a pod, this would take on a value like: - "spec.containers{name}" (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" (container with - index 2 in this pod). This syntax is chosen only to have some well-defined way of - referencing a part of an object. - type: string - kind: - description: |- - Kind of the referent. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - name: - description: |- - Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - namespace: - description: |- - Namespace of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - type: string - resourceVersion: - description: |- - Specific resourceVersion to which this reference is made, if any. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency - type: string - uid: - description: |- - UID of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - type: string - type: object - x-kubernetes-map-type: atomic - type: array - type: object - type: object - served: true - storage: false - subresources: - status: {} - name: v1beta1 schema: openAPIV3Schema: diff --git a/templates/provider/kcm/projectsveltos-crds/clusterprofiles.config.projectsveltos.io.yaml b/templates/provider/kcm/projectsveltos-crds/clusterprofiles.config.projectsveltos.io.yaml index 491466343..4bad2b519 100644 --- a/templates/provider/kcm/projectsveltos-crds/clusterprofiles.config.projectsveltos.io.yaml +++ b/templates/provider/kcm/projectsveltos-crds/clusterprofiles.config.projectsveltos.io.yaml @@ -3,20 +3,9 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - cert-manager.io/inject-ca-from: projectsveltos/projectsveltos-serving-cert controller-gen.kubebuilder.io/version: v0.17.2 name: clusterprofiles.config.projectsveltos.io spec: - conversion: - strategy: Webhook - webhook: - clientConfig: - service: - name: webhook-service - namespace: projectsveltos - path: /convert - conversionReviewVersions: - - v1 group: config.projectsveltos.io names: kind: ClusterProfile @@ -25,917 +14,6 @@ spec: singular: clusterprofile scope: Cluster versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - description: ClusterProfile is the Schema for the clusterprofiles 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: - properties: - clusterRefs: - description: ClusterRefs identifies clusters to associate to. - items: - description: ObjectReference contains enough information to let you inspect or modify the referred object. - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: |- - If referring to a piece of an object instead of an entire object, this string - should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within a pod, this would take on a value like: - "spec.containers{name}" (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" (container with - index 2 in this pod). This syntax is chosen only to have some well-defined way of - referencing a part of an object. - type: string - kind: - description: |- - Kind of the referent. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - name: - description: |- - Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - namespace: - description: |- - Namespace of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - type: string - resourceVersion: - description: |- - Specific resourceVersion to which this reference is made, if any. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency - type: string - uid: - description: |- - UID of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - type: string - type: object - x-kubernetes-map-type: atomic - type: array - clusterSelector: - description: ClusterSelector identifies clusters to associate to. - type: string - continueOnConflict: - default: false - description: |- - By default (when ContinueOnConflict is unset or set to false), Sveltos stops deployment after - encountering the first conflict (e.g., another ClusterProfile already deployed the resource). - If set to true, Sveltos will attempt to deploy remaining resources in the ClusterProfile even - if conflicts are detected for previous resources. - type: boolean - dependsOn: - description: |- - DependsOn specifies a list of other ClusterProfiles that this instance depends on. - In any managed cluster that matches this ClusterProfile, the add-ons and applications - defined in this instance will not be deployed until all add-ons and applications in the - ClusterProfiles listed as dependencies are deployed. - items: - type: string - type: array - extraAnnotations: - additionalProperties: - type: string - description: |- - ExtraAnnotations: These annotations will be added by Sveltos to all Kubernetes resources - deployed in a managed cluster based on this ClusterProfile/Profile instance. - **Important:** If a resource deployed by Sveltos already has a annotation with a key present in - `ExtraAnnotations`, the value from `ExtraAnnotations` will override the existing value. - type: object - extraLabels: - additionalProperties: - type: string - description: |- - ExtraLabels: These labels will be added by Sveltos to all Kubernetes resources deployed in - a managed cluster based on this ClusterProfile/Profile instance. - **Important:** If a resource deployed by Sveltos already has a label with a key present in - `ExtraLabels`, the value from `ExtraLabels` will override the existing value. - type: object - helmCharts: - description: Helm charts is a list of helm charts that need to be deployed - items: - properties: - chartName: - description: ChartName is the chart name - minLength: 1 - type: string - chartVersion: - description: ChartVersion is the chart version - minLength: 1 - type: string - helmChartAction: - default: Install - description: HelmChartAction is the action that will be taken on the helm chart - enum: - - Install - - Uninstall - type: string - options: - description: Options allows to set flags which are used during installation. - properties: - atomic: - default: false - description: |- - if set, the installation process deletes the installation/upgrades on failure. - The --wait flag will be set automatically if --atomic is used - Default to false - type: boolean - dependencyUpdate: - default: false - description: |- - update dependencies if they are missing before installing the chart - Default to false - type: boolean - description: - description: Description is the description of an helm operation - type: string - disableHooks: - default: false - description: |- - prevent hooks from running during install/upgrade/uninstall - Default to false - type: boolean - disableOpenAPIValidation: - default: false - description: |- - if set, the installation process will not validate rendered templates against the Kubernetes OpenAPI Schema - Default to false - type: boolean - enableClientCache: - default: false - description: EnableClientCache is a flag to enable Helm client cache. If it is not specified, it will be set to false. - type: boolean - installOptions: - description: HelmInstallOptions are options specific to helm install - properties: - createNamespace: - default: true - description: Create the release namespace if not present. Defaults to true - type: boolean - replace: - default: true - description: Replaces if set indicates to replace an older release with this one - type: boolean - type: object - labels: - additionalProperties: - type: string - description: Labels that would be added to release metadata. - type: object - skipCRDs: - default: false - description: |- - SkipCRDs controls whether CRDs should be installed during install/upgrade operation. - By default, CRDs are installed if not already present. - type: boolean - skipSchemaValidation: - default: false - description: SkipSchemaValidation determines if JSON schema validation is disabled. - type: boolean - timeout: - description: time to wait for any individual Kubernetes operation (like Jobs for hooks) (default 5m0s) - type: string - uninstallOptions: - description: HelmUninstallOptions are options specific to helm uninstall - properties: - deletionPropagation: - description: DeletionPropagation - enum: - - orphan - - foreground - - background - type: string - keepHistory: - description: |- - When uninstall a chart with this flag, Helm removes the resources associated with the chart, - but it keeps the release information. This allows to see details about the uninstalled release - using the helm history command. - type: boolean - type: object - upgradeOptions: - description: HelmUpgradeOptions are options specific to helm upgrade - properties: - cleanupOnFail: - default: false - description: CleanupOnFail will, if true, cause the upgrade to delete newly-created resources on a failed update. - type: boolean - force: - default: false - description: |- - Force will, if set to `true`, ignore certain warnings and perform the upgrade anyway. - This should be used with caution. - type: boolean - maxHistory: - default: 2 - description: |- - MaxHistory limits the maximum number of revisions saved per release - Default to 2 - type: integer - recreate: - default: false - description: Recreate will (if true) recreate pods after a rollback. - type: boolean - resetThenReuseValues: - default: false - description: ResetThenReuseValues will reset the values to the chart's built-ins then merge with user's last supplied values. - type: boolean - resetValues: - default: false - description: ResetValues will reset the values to the chart's built-ins rather than merging with existing. - type: boolean - reuseValues: - default: false - description: |- - ReuseValues copies values from the current release to a new release if the - new release does not have any values. If the request already has values, - or if there are no values in the current release, this does nothing. - This is skipped if the ResetValues flag is set, in which case the - request values are not altered. - type: boolean - subNotes: - default: false - description: SubNotes determines whether sub-notes are rendered in the chart. - type: boolean - upgradeCRDs: - default: false - description: |- - UpgradeCRDs upgrade CRDs from the Helm Chart's crds directory - By default, CRDs are not applied during Helm upgrade action by Helm - https://helm.sh/docs/chart_best_practices/custom_resource_definitions/ - type: boolean - type: object - wait: - default: false - description: |- - if set, will wait until all Pods, PVCs, Services, and minimum number of Pods of a Deployment, StatefulSet, or ReplicaSet - are in a ready state before marking the release as successful. It will wait for as long as --timeout - Default to false - type: boolean - waitForJobs: - default: false - description: |- - if set and --wait enabled, will wait until all Jobs have been completed before marking the release as successful. - It will wait for as long as --timeout - Default to false - type: boolean - type: object - releaseName: - description: ReleaseName is the chart release - minLength: 1 - type: string - releaseNamespace: - description: ReleaseNamespace is the namespace release will be installed - minLength: 1 - type: string - repositoryName: - description: RepositoryName is the name helm chart repository - minLength: 1 - type: string - repositoryURL: - description: RepositoryURL is the URL helm chart repository - minLength: 1 - type: string - values: - description: |- - Values field allows to define configuration for the Helm release. - These values can be static or leverage Go templates for dynamic customization. - When expressed as templates, the values are filled in using information from - resources within the management cluster before deployment. - type: string - valuesFrom: - description: |- - ValuesFrom can reference ConfigMap/Secret instances. Within the ConfigMap or Secret data, - it is possible to store configuration for the Helm release. - These values can be static or leverage Go templates for dynamic customization. - When expressed as templates, the values are filled in using information from - resources within the management cluster before deployment. - items: - properties: - kind: - description: |- - Kind of the resource. Supported kinds are: - - ConfigMap/Secret - enum: - - ConfigMap - - Secret - type: string - name: - description: Name of the referenced resource. - minLength: 1 - type: string - namespace: - description: |- - Namespace of the referenced resource. - For ClusterProfile namespace can be left empty. In such a case, namespace will - be implicit set to cluster's namespace. - For Profile namespace must be left empty. The Profile namespace will be used. - type: string - required: - - kind - - name - - namespace - type: object - type: array - required: - - chartName - - chartVersion - - releaseName - - releaseNamespace - - repositoryName - - repositoryURL - type: object - type: array - kustomizationRefs: - description: |- - Kustomization refs is a list of kustomization paths. Kustomization will - be run on those paths and the outcome will be deployed. - items: - properties: - deploymentType: - default: Remote - description: |- - DeploymentType indicates whether resources need to be deployed - into the management cluster (local) or the managed cluster (remote) - enum: - - Local - - Remote - type: string - kind: - description: |- - Kind of the resource. Supported kinds are: - - flux GitRepository;OCIRepository;Bucket - - ConfigMap/Secret - enum: - - GitRepository - - OCIRepository - - Bucket - - ConfigMap - - Secret - type: string - name: - description: Name of the referenced resource. - minLength: 1 - type: string - namespace: - description: |- - Namespace of the referenced resource. - For ClusterProfile namespace can be left empty. In such a case, namespace will - be implicit set to cluster's namespace. - For Profile namespace must be left empty. The Profile namespace will be used. - type: string - path: - description: |- - Path to the directory containing the kustomization.yaml file, or the - set of plain YAMLs a kustomization.yaml should be generated for. - Defaults to 'None', which translates to the root path of the SourceRef. - type: string - targetNamespace: - description: |- - TargetNamespace sets or overrides the namespace in the - kustomization.yaml file. - maxLength: 63 - minLength: 1 - type: string - values: - additionalProperties: - type: string - description: |- - Values is a map[string]string type that allows to define a set of key-value pairs. - These key-value pairs can optionally leverage Go templates for further processing. - With Sveltos, you can define key-value pairs where the values can be Go templates. - These templates have access to management cluster information during deployment. This allows - to do more than just replace placeholders. Variables can be used to dynamically - construct values based on other resources or variables within the Kustomize output. - For example, imagine you have a Region key with a template value like: - '{{ index .Cluster.metadata.labels "region" }}'. - This template retrieves the region label from the cluster instance metadata. - Finally, Sveltos uses these processed values to fill placeholders in the Kustomize output. - The output itself can also contain templates, like: - region: '{{ default "west" .Region }}'. - This way, the final output from Kustomize will have the region set dynamically based on - the actual region retrieved earlier. - type: object - valuesFrom: - description: |- - ValuesFrom can reference ConfigMap/Secret instances. Within the ConfigMap or Secret data, - it is possible to define key-value pairs. These key-value pairs can optionally leverage - Go templates for further processing. - With Sveltos, you can define key-value pairs where the values can be Go templates. - These templates have access to management cluster information during deployment. This allows - to do more than just replace placeholders. Variables can be used to dynamically - construct values based on other resources or variables within the Kustomize output. - For example, imagine you have a Region key with a template value like: - '{{ index .Cluster.metadata.labels "region" }}'. - This template retrieves the region label from the cluster instance metadata. - Finally, Sveltos uses these processed values to fill placeholders in the Kustomize output. - The output itself can also contain templates, like: - region: '{{ default "west" .Region }}'. - This way, the final output from Kustomize will have the region set dynamically based on - the actual region retrieved earlier. - items: - properties: - kind: - description: |- - Kind of the resource. Supported kinds are: - - ConfigMap/Secret - enum: - - ConfigMap - - Secret - type: string - name: - description: Name of the referenced resource. - minLength: 1 - type: string - namespace: - description: |- - Namespace of the referenced resource. - For ClusterProfile namespace can be left empty. In such a case, namespace will - be implicit set to cluster's namespace. - For Profile namespace must be left empty. The Profile namespace will be used. - type: string - required: - - kind - - name - - namespace - type: object - type: array - required: - - kind - - name - - namespace - type: object - type: array - maxUpdate: - anyOf: - - type: integer - - type: string - description: |- - The maximum number of clusters that can be updated concurrently. - Value can be an absolute number (ex: 5) or a percentage of desired cluster (ex: 10%). - Defaults to 100%. - Example: when this is set to 30%, when list of add-ons/applications in ClusterProfile - changes, only 30% of matching clusters will be updated in parallel. Only when updates - in those cluster succeed, other matching clusters are updated. - pattern: ^((100|[0-9]{1,2})%|[0-9]+)$ - x-kubernetes-int-or-string: true - policyRefs: - description: |- - PolicyRefs references all the ConfigMaps/Secrets containing kubernetes resources - that need to be deployed in the matching CAPI clusters. - items: - properties: - deploymentType: - default: Remote - description: |- - DeploymentType indicates whether resources need to be deployed - into the management cluster (local) or the managed cluster (remote) - enum: - - Local - - Remote - type: string - kind: - description: |- - Kind of the resource. Supported kinds are: - - ConfigMap/Secret - - flux GitRepository;OCIRepository;Bucket - enum: - - GitRepository - - OCIRepository - - Bucket - - ConfigMap - - Secret - type: string - name: - description: Name of the referenced resource. - minLength: 1 - type: string - namespace: - description: |- - Namespace of the referenced resource. - For ClusterProfile namespace can be left empty. In such a case, namespace will - be implicit set to cluster's namespace. - For Profile namespace must be left empty. Profile namespace will be used. - type: string - path: - description: |- - Path to the directory containing the YAML files. - Defaults to 'None', which translates to the root path of the SourceRef. - Used only for GitRepository;OCIRepository;Bucket - type: string - required: - - kind - - name - type: object - type: array - reloader: - default: false - description: |- - Reloader indicates whether Deployment/StatefulSet/DaemonSet instances deployed - by Sveltos and part of this ClusterProfile need to be restarted via rolling upgrade - when a ConfigMap/Secret instance mounted as volume is modified. - When set to true, when any mounted ConfigMap/Secret is modified, Sveltos automatically - starts a rolling upgrade for Deployment/StatefulSet/DaemonSet instances mounting it. - type: boolean - setRefs: - description: |- - SetRefs identifies referenced (cluster)Sets. - - ClusterProfile can reference ClusterSet; - - Profile can reference Set; - items: - type: string - type: array - stopMatchingBehavior: - default: WithdrawPolicies - description: |- - StopMatchingBehavior indicates what behavior should be when a Cluster stop matching - the ClusterProfile. By default all deployed Helm charts and Kubernetes resources will - be withdrawn from Cluster. Setting StopMatchingBehavior to LeavePolicies will instead - leave ClusterProfile deployed policies in the Cluster. - enum: - - WithdrawPolicies - - LeavePolicies - type: string - syncMode: - default: Continuous - description: |- - SyncMode specifies how features are synced in a matching workload cluster. - - OneTime means, first time a workload cluster matches the ClusterProfile, - features will be deployed in such cluster. Any subsequent feature configuration - change won't be applied into the matching workload clusters; - - Continuous mode ensures that the first time a workload cluster matches a ClusterProfile, - the specified features are deployed. Subsequent changes to the feature configuration are also - automatically applied to all matching workload clusters. - _ SyncModeContinuousWithDriftDetection operates similarly to Continuous mode, but also monitors - matching managed clusters for configuration drift. If drift is detected, a reconciliation is - triggered to ensure the managed cluster's configuration aligns with the ClusterProfile. - - DryRun means no change will be propagated to any matching cluster. A report - instead will be generated summarizing what would happen in any matching cluster - because of the changes made to ClusterProfile while in DryRun mode. - enum: - - OneTime - - Continuous - - ContinuousWithDriftDetection - - DryRun - type: string - templateResourceRefs: - description: |- - TemplateResourceRefs is a list of resource to collect from the management cluster. - Those resources' values will be used to instantiate templates contained in referenced - PolicyRefs and Helm charts - items: - properties: - identifier: - description: |- - Identifier is how the resource will be referred to in the - template - type: string - resource: - description: |- - Resource references a Kubernetes instance in the management - cluster to fetch and use during template instantiation. - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: |- - If referring to a piece of an object instead of an entire object, this string - should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within a pod, this would take on a value like: - "spec.containers{name}" (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" (container with - index 2 in this pod). This syntax is chosen only to have some well-defined way of - referencing a part of an object. - type: string - kind: - description: |- - Kind of the referent. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - name: - description: |- - Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - namespace: - description: |- - Namespace of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - type: string - resourceVersion: - description: |- - Specific resourceVersion to which this reference is made, if any. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency - type: string - uid: - description: |- - UID of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - type: string - type: object - x-kubernetes-map-type: atomic - required: - - identifier - - resource - type: object - type: array - x-kubernetes-list-map-keys: - - identifier - x-kubernetes-list-type: map - tier: - default: 100 - description: |- - Tier controls the order of deployment for ClusterProfile or Profile resources targeting - the same cluster resources. - Imagine two configurations (ClusterProfiles or Profiles) trying to deploy the same resource (a Kubernetes - resource or an helm chart). By default, the first one to reach the cluster "wins" and deploys it. - Tier allows you to override this. When conflicts arise, the ClusterProfile or Profile with the **lowest** - Tier value takes priority and deploys the resource. - Higher Tier values represent lower priority. The default Tier value is 100. - Using Tiers provides finer control over resource deployment within your cluster, particularly useful - when multiple configurations manage the same resources. - format: int32 - minimum: 1 - type: integer - validateHealths: - description: |- - ValidateHealths is a slice of Lua functions to run against - the managed cluster to validate the state of those add-ons/applications - is healthy - items: - properties: - featureID: - description: |- - FeatureID is an indentifier of the feature (Helm/Kustomize/Resources) - This field indicates when to run this check. - For instance: - - if set to Helm this check will be run after all helm - charts specified in the ClusterProfile are deployed. - - if set to Resources this check will be run after the content - of all the ConfigMaps/Secrets referenced by ClusterProfile in the - PolicyRef sections is deployed - enum: - - Resources - - Helm - - Kustomize - type: string - group: - description: Group of the resource to fetch in the managed Cluster. - type: string - kind: - description: Kind of the resource to fetch in the managed Cluster. - minLength: 1 - type: string - labelFilters: - description: LabelFilters allows to filter resources based on current labels. - items: - properties: - key: - description: Key is the label key - type: string - operation: - description: Operation is the comparison operation - enum: - - Equal - - Different - type: string - value: - description: Value is the label value - type: string - required: - - key - - operation - - value - type: object - type: array - name: - description: Name is the name of this check - type: string - namespace: - description: |- - Namespace of the resource to fetch in the managed Cluster. - Empty for resources scoped at cluster level. - type: string - script: - description: |- - Script is a text containing a lua script. - Must return struct with field "health" - representing whether object is a match (true or false) - type: string - version: - description: Version of the resource to fetch in the managed Cluster. - type: string - required: - - featureID - - group - - kind - - name - - version - type: object - type: array - type: object - status: - description: Status defines the observed state of ClusterProfile/Profile - properties: - matchingClusters: - description: |- - MatchingClusterRefs reference all the clusters currently matching - ClusterProfile ClusterSelector - items: - description: ObjectReference contains enough information to let you inspect or modify the referred object. - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: |- - If referring to a piece of an object instead of an entire object, this string - should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within a pod, this would take on a value like: - "spec.containers{name}" (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" (container with - index 2 in this pod). This syntax is chosen only to have some well-defined way of - referencing a part of an object. - type: string - kind: - description: |- - Kind of the referent. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - name: - description: |- - Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - namespace: - description: |- - Namespace of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - type: string - resourceVersion: - description: |- - Specific resourceVersion to which this reference is made, if any. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency - type: string - uid: - description: |- - UID of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - type: string - type: object - x-kubernetes-map-type: atomic - type: array - updatedClusters: - description: |- - UpdatedClusters contains information all the cluster currently matching - ClusterProfile ClusterSelector and already updated to latest ClusterProfile - Spec - properties: - clusters: - description: |- - Clusters reference all the clusters currently matching - ClusterProfile ClusterSelector and already updated/being updated - to ClusterProfile Spec - items: - description: ObjectReference contains enough information to let you inspect or modify the referred object. - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: |- - If referring to a piece of an object instead of an entire object, this string - should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within a pod, this would take on a value like: - "spec.containers{name}" (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" (container with - index 2 in this pod). This syntax is chosen only to have some well-defined way of - referencing a part of an object. - type: string - kind: - description: |- - Kind of the referent. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - name: - description: |- - Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - namespace: - description: |- - Namespace of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - type: string - resourceVersion: - description: |- - Specific resourceVersion to which this reference is made, if any. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency - type: string - uid: - description: |- - UID of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - type: string - type: object - x-kubernetes-map-type: atomic - type: array - hash: - description: |- - Hash represents of a unique value for ClusterProfile Spec at - a fixed point in time - format: byte - type: string - type: object - updatingClusters: - description: |- - UpdatingClusters reference all the cluster currently matching - ClusterProfile ClusterSelector and being updated - properties: - clusters: - description: |- - Clusters reference all the clusters currently matching - ClusterProfile ClusterSelector and already updated/being updated - to ClusterProfile Spec - items: - description: ObjectReference contains enough information to let you inspect or modify the referred object. - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: |- - If referring to a piece of an object instead of an entire object, this string - should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within a pod, this would take on a value like: - "spec.containers{name}" (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" (container with - index 2 in this pod). This syntax is chosen only to have some well-defined way of - referencing a part of an object. - type: string - kind: - description: |- - Kind of the referent. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - name: - description: |- - Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - namespace: - description: |- - Namespace of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - type: string - resourceVersion: - description: |- - Specific resourceVersion to which this reference is made, if any. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency - type: string - uid: - description: |- - UID of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - type: string - type: object - x-kubernetes-map-type: atomic - type: array - hash: - description: |- - Hash represents of a unique value for ClusterProfile Spec at - a fixed point in time - format: byte - type: string - type: object - type: object - type: object - served: true - storage: false - subresources: - status: {} - name: v1beta1 schema: openAPIV3Schema: @@ -1592,6 +670,13 @@ spec: - namespace type: object type: array + maxConsecutiveFailures: + description: |- + The maximum number of consecutive deployment failures that Sveltos will permit. + After this many consecutive failures, the deployment will be considered failed, and Sveltos will stop retrying. + This setting applies only to feature deployments, not resource removal. + This field is optional. If not set, Sveltos default behavior is to keep retrying. + type: integer maxUpdate: anyOf: - type: integer diff --git a/templates/provider/kcm/projectsveltos-crds/clusterreports.config.projectsveltos.io.yaml b/templates/provider/kcm/projectsveltos-crds/clusterreports.config.projectsveltos.io.yaml index 9492fdfa6..8d172e44f 100644 --- a/templates/provider/kcm/projectsveltos-crds/clusterreports.config.projectsveltos.io.yaml +++ b/templates/provider/kcm/projectsveltos-crds/clusterreports.config.projectsveltos.io.yaml @@ -14,307 +14,6 @@ spec: singular: clusterreport scope: Namespaced versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - description: ClusterReport is the Schema for the clusterreports 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: ClusterReportSpec defines the desired state of ClusterReport - properties: - clusterName: - description: |- - ClusterName is the name of the CAPI Cluster this ClusterReport - is for. - type: string - clusterNamespace: - description: |- - ClusterNamespace is the namespace of the CAPI Cluster this - ClusterReport is for. - type: string - required: - - clusterName - - clusterNamespace - type: object - status: - description: ClusterReportStatus defines the observed state of ClusterReport - properties: - kustomizeResourceReports: - description: |- - KustomizeResourceReports contains report on Kubernetes resources - deployed because of KustomizationRefs - items: - properties: - action: - description: Action represent the type of operation on the Kubernetes resource. - enum: - - No Action - - Create - - Update - - Delete - - Conflict - type: string - message: - description: |- - Message is for any message that needs to added to better - explain the action. - type: string - resource: - description: Resource contains information about Kubernetes Resource - properties: - group: - description: Group of the resource deployed in the Cluster. - type: string - ignoreForConfigurationDrift: - default: false - description: |- - IgnoreForConfigurationDrift indicates to not track resource - for configuration drift detection. - This field has a meaning only when mode is ContinuousWithDriftDetection - type: boolean - kind: - description: Kind of the resource deployed in the Cluster. - minLength: 1 - type: string - lastAppliedTime: - description: LastAppliedTime identifies when this resource was last applied to the cluster. - format: date-time - type: string - name: - description: Name of the resource deployed in the Cluster. - minLength: 1 - type: string - namespace: - description: |- - Namespace of the resource deployed in the Cluster. - Empty for resources scoped at cluster level. - type: string - owner: - description: Owner is the list of ConfigMap/Secret containing this resource. - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: |- - If referring to a piece of an object instead of an entire object, this string - should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within a pod, this would take on a value like: - "spec.containers{name}" (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" (container with - index 2 in this pod). This syntax is chosen only to have some well-defined way of - referencing a part of an object. - type: string - kind: - description: |- - Kind of the referent. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - name: - description: |- - Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - namespace: - description: |- - Namespace of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - type: string - resourceVersion: - description: |- - Specific resourceVersion to which this reference is made, if any. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency - type: string - uid: - description: |- - UID of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - type: string - type: object - x-kubernetes-map-type: atomic - version: - description: Version of the resource deployed in the Cluster. - minLength: 1 - type: string - required: - - group - - kind - - name - - owner - - version - type: object - required: - - resource - type: object - type: array - releaseReports: - description: ReleaseReports contains report on helm releases - items: - properties: - action: - description: Action represent the type of operation on the Helm Chart - enum: - - No Action - - Install - - Upgrade - - Delete - - Conflict - type: string - chartName: - description: ReleaseName of the release deployed in the CAPI Cluster. - minLength: 1 - type: string - chartVersion: - description: |- - ChartVersion is the version of the helm chart deployed - in the CAPI Cluster. - type: string - message: - description: |- - Message is for any message that needs to added to better - explain the action. - type: string - releaseNamespace: - description: Namespace where release is deployed in the CAPI Cluster. - minLength: 1 - type: string - required: - - chartName - - chartVersion - - releaseNamespace - type: object - type: array - resourceReports: - description: |- - ResourceReports contains report on Kubernetes resources - deployed because of PolicyRefs - items: - properties: - action: - description: Action represent the type of operation on the Kubernetes resource. - enum: - - No Action - - Create - - Update - - Delete - - Conflict - type: string - message: - description: |- - Message is for any message that needs to added to better - explain the action. - type: string - resource: - description: Resource contains information about Kubernetes Resource - properties: - group: - description: Group of the resource deployed in the Cluster. - type: string - ignoreForConfigurationDrift: - default: false - description: |- - IgnoreForConfigurationDrift indicates to not track resource - for configuration drift detection. - This field has a meaning only when mode is ContinuousWithDriftDetection - type: boolean - kind: - description: Kind of the resource deployed in the Cluster. - minLength: 1 - type: string - lastAppliedTime: - description: LastAppliedTime identifies when this resource was last applied to the cluster. - format: date-time - type: string - name: - description: Name of the resource deployed in the Cluster. - minLength: 1 - type: string - namespace: - description: |- - Namespace of the resource deployed in the Cluster. - Empty for resources scoped at cluster level. - type: string - owner: - description: Owner is the list of ConfigMap/Secret containing this resource. - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: |- - If referring to a piece of an object instead of an entire object, this string - should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within a pod, this would take on a value like: - "spec.containers{name}" (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" (container with - index 2 in this pod). This syntax is chosen only to have some well-defined way of - referencing a part of an object. - type: string - kind: - description: |- - Kind of the referent. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - name: - description: |- - Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - namespace: - description: |- - Namespace of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - type: string - resourceVersion: - description: |- - Specific resourceVersion to which this reference is made, if any. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency - type: string - uid: - description: |- - UID of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - type: string - type: object - x-kubernetes-map-type: atomic - version: - description: Version of the resource deployed in the Cluster. - minLength: 1 - type: string - required: - - group - - kind - - name - - owner - - version - type: object - required: - - resource - type: object - type: array - type: object - type: object - served: true - storage: false - subresources: - status: {} - name: v1beta1 schema: openAPIV3Schema: diff --git a/templates/provider/kcm/projectsveltos-crds/clustersets.lib.projectsveltos.io.yaml b/templates/provider/kcm/projectsveltos-crds/clustersets.lib.projectsveltos.io.yaml index b973e227b..8bc953494 100644 --- a/templates/provider/kcm/projectsveltos-crds/clustersets.lib.projectsveltos.io.yaml +++ b/templates/provider/kcm/projectsveltos-crds/clustersets.lib.projectsveltos.io.yaml @@ -3,20 +3,9 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - cert-manager.io/inject-ca-from: projectsveltos/projectsveltos-serving-cert controller-gen.kubebuilder.io/version: v0.17.2 name: clustersets.lib.projectsveltos.io spec: - conversion: - strategy: Webhook - webhook: - clientConfig: - service: - name: webhook-service - namespace: projectsveltos - path: /convert - conversionReviewVersions: - - v1 group: lib.projectsveltos.io names: kind: ClusterSet @@ -25,190 +14,6 @@ spec: singular: clusterset scope: Cluster versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - description: ClusterSet is the Schema for the clustersets 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: - properties: - clusterRefs: - description: ClusterRefs identifies clusters to associate to. - items: - description: ObjectReference contains enough information to let you inspect or modify the referred object. - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: |- - If referring to a piece of an object instead of an entire object, this string - should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within a pod, this would take on a value like: - "spec.containers{name}" (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" (container with - index 2 in this pod). This syntax is chosen only to have some well-defined way of - referencing a part of an object. - type: string - kind: - description: |- - Kind of the referent. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - name: - description: |- - Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - namespace: - description: |- - Namespace of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - type: string - resourceVersion: - description: |- - Specific resourceVersion to which this reference is made, if any. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency - type: string - uid: - description: |- - UID of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - type: string - type: object - x-kubernetes-map-type: atomic - type: array - clusterSelector: - description: ClusterSelector identifies clusters to associate to (Deprecated use selector instead). - type: string - maxReplicas: - description: |- - MaxReplicas specifies the maximum number of clusters to be selected - from the pool matching the clusterSelector. - type: integer - type: object - status: - description: Status defines the observed state of ClusterSet/Set - properties: - matchingClusterRefs: - description: |- - MatchingClusterRefs reference all the clusters currently matching - ClusterSet/Set ClusterSelector - items: - description: ObjectReference contains enough information to let you inspect or modify the referred object. - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: |- - If referring to a piece of an object instead of an entire object, this string - should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within a pod, this would take on a value like: - "spec.containers{name}" (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" (container with - index 2 in this pod). This syntax is chosen only to have some well-defined way of - referencing a part of an object. - type: string - kind: - description: |- - Kind of the referent. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - name: - description: |- - Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - namespace: - description: |- - Namespace of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - type: string - resourceVersion: - description: |- - Specific resourceVersion to which this reference is made, if any. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency - type: string - uid: - description: |- - UID of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - type: string - type: object - x-kubernetes-map-type: atomic - type: array - selectedClusterRefs: - description: |- - SelectedClusters reference all the cluster currently selected among - all the ones matching - items: - description: ObjectReference contains enough information to let you inspect or modify the referred object. - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: |- - If referring to a piece of an object instead of an entire object, this string - should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within a pod, this would take on a value like: - "spec.containers{name}" (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" (container with - index 2 in this pod). This syntax is chosen only to have some well-defined way of - referencing a part of an object. - type: string - kind: - description: |- - Kind of the referent. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - name: - description: |- - Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - namespace: - description: |- - Namespace of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - type: string - resourceVersion: - description: |- - Specific resourceVersion to which this reference is made, if any. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency - type: string - uid: - description: |- - UID of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - type: string - type: object - x-kubernetes-map-type: atomic - type: array - type: object - type: object - served: true - storage: false - subresources: - status: {} - name: v1beta1 schema: openAPIV3Schema: diff --git a/templates/provider/kcm/projectsveltos-crds/clustersummaries.config.projectsveltos.io.yaml b/templates/provider/kcm/projectsveltos-crds/clustersummaries.config.projectsveltos.io.yaml index 803b50eea..74af3dca5 100644 --- a/templates/provider/kcm/projectsveltos-crds/clustersummaries.config.projectsveltos.io.yaml +++ b/templates/provider/kcm/projectsveltos-crds/clustersummaries.config.projectsveltos.io.yaml @@ -3,20 +3,9 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - cert-manager.io/inject-ca-from: projectsveltos/projectsveltos-serving-cert controller-gen.kubebuilder.io/version: v0.17.2 name: clustersummaries.config.projectsveltos.io spec: - conversion: - strategy: Webhook - webhook: - clientConfig: - service: - name: webhook-service - namespace: projectsveltos - path: /convert - conversionReviewVersions: - - v1 group: config.projectsveltos.io names: kind: ClusterSummary @@ -25,897 +14,6 @@ spec: singular: clustersummary scope: Namespaced versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - description: ClusterSummary is the Schema for the clustersummaries 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: ClusterSummarySpec defines the desired state of ClusterSummary - properties: - clusterName: - description: ClusterName is the name of the workload Cluster this ClusterSummary is for. - type: string - clusterNamespace: - description: |- - ClusterNamespace is the namespace of the workload Cluster this - ClusterSummary is for. - type: string - clusterProfileSpec: - description: |- - ClusterProfileSpec represent the configuration that will be applied to - the workload cluster. - properties: - clusterRefs: - description: ClusterRefs identifies clusters to associate to. - items: - description: ObjectReference contains enough information to let you inspect or modify the referred object. - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: |- - If referring to a piece of an object instead of an entire object, this string - should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within a pod, this would take on a value like: - "spec.containers{name}" (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" (container with - index 2 in this pod). This syntax is chosen only to have some well-defined way of - referencing a part of an object. - type: string - kind: - description: |- - Kind of the referent. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - name: - description: |- - Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - namespace: - description: |- - Namespace of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - type: string - resourceVersion: - description: |- - Specific resourceVersion to which this reference is made, if any. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency - type: string - uid: - description: |- - UID of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - type: string - type: object - x-kubernetes-map-type: atomic - type: array - clusterSelector: - description: ClusterSelector identifies clusters to associate to. - type: string - continueOnConflict: - default: false - description: |- - By default (when ContinueOnConflict is unset or set to false), Sveltos stops deployment after - encountering the first conflict (e.g., another ClusterProfile already deployed the resource). - If set to true, Sveltos will attempt to deploy remaining resources in the ClusterProfile even - if conflicts are detected for previous resources. - type: boolean - dependsOn: - description: |- - DependsOn specifies a list of other ClusterProfiles that this instance depends on. - In any managed cluster that matches this ClusterProfile, the add-ons and applications - defined in this instance will not be deployed until all add-ons and applications in the - ClusterProfiles listed as dependencies are deployed. - items: - type: string - type: array - extraAnnotations: - additionalProperties: - type: string - description: |- - ExtraAnnotations: These annotations will be added by Sveltos to all Kubernetes resources - deployed in a managed cluster based on this ClusterProfile/Profile instance. - **Important:** If a resource deployed by Sveltos already has a annotation with a key present in - `ExtraAnnotations`, the value from `ExtraAnnotations` will override the existing value. - type: object - extraLabels: - additionalProperties: - type: string - description: |- - ExtraLabels: These labels will be added by Sveltos to all Kubernetes resources deployed in - a managed cluster based on this ClusterProfile/Profile instance. - **Important:** If a resource deployed by Sveltos already has a label with a key present in - `ExtraLabels`, the value from `ExtraLabels` will override the existing value. - type: object - helmCharts: - description: Helm charts is a list of helm charts that need to be deployed - items: - properties: - chartName: - description: ChartName is the chart name - minLength: 1 - type: string - chartVersion: - description: ChartVersion is the chart version - minLength: 1 - type: string - helmChartAction: - default: Install - description: HelmChartAction is the action that will be taken on the helm chart - enum: - - Install - - Uninstall - type: string - options: - description: Options allows to set flags which are used during installation. - properties: - atomic: - default: false - description: |- - if set, the installation process deletes the installation/upgrades on failure. - The --wait flag will be set automatically if --atomic is used - Default to false - type: boolean - dependencyUpdate: - default: false - description: |- - update dependencies if they are missing before installing the chart - Default to false - type: boolean - description: - description: Description is the description of an helm operation - type: string - disableHooks: - default: false - description: |- - prevent hooks from running during install/upgrade/uninstall - Default to false - type: boolean - disableOpenAPIValidation: - default: false - description: |- - if set, the installation process will not validate rendered templates against the Kubernetes OpenAPI Schema - Default to false - type: boolean - enableClientCache: - default: false - description: EnableClientCache is a flag to enable Helm client cache. If it is not specified, it will be set to false. - type: boolean - installOptions: - description: HelmInstallOptions are options specific to helm install - properties: - createNamespace: - default: true - description: Create the release namespace if not present. Defaults to true - type: boolean - replace: - default: true - description: Replaces if set indicates to replace an older release with this one - type: boolean - type: object - labels: - additionalProperties: - type: string - description: Labels that would be added to release metadata. - type: object - skipCRDs: - default: false - description: |- - SkipCRDs controls whether CRDs should be installed during install/upgrade operation. - By default, CRDs are installed if not already present. - type: boolean - skipSchemaValidation: - default: false - description: SkipSchemaValidation determines if JSON schema validation is disabled. - type: boolean - timeout: - description: time to wait for any individual Kubernetes operation (like Jobs for hooks) (default 5m0s) - type: string - uninstallOptions: - description: HelmUninstallOptions are options specific to helm uninstall - properties: - deletionPropagation: - description: DeletionPropagation - enum: - - orphan - - foreground - - background - type: string - keepHistory: - description: |- - When uninstall a chart with this flag, Helm removes the resources associated with the chart, - but it keeps the release information. This allows to see details about the uninstalled release - using the helm history command. - type: boolean - type: object - upgradeOptions: - description: HelmUpgradeOptions are options specific to helm upgrade - properties: - cleanupOnFail: - default: false - description: CleanupOnFail will, if true, cause the upgrade to delete newly-created resources on a failed update. - type: boolean - force: - default: false - description: |- - Force will, if set to `true`, ignore certain warnings and perform the upgrade anyway. - This should be used with caution. - type: boolean - maxHistory: - default: 2 - description: |- - MaxHistory limits the maximum number of revisions saved per release - Default to 2 - type: integer - recreate: - default: false - description: Recreate will (if true) recreate pods after a rollback. - type: boolean - resetThenReuseValues: - default: false - description: ResetThenReuseValues will reset the values to the chart's built-ins then merge with user's last supplied values. - type: boolean - resetValues: - default: false - description: ResetValues will reset the values to the chart's built-ins rather than merging with existing. - type: boolean - reuseValues: - default: false - description: |- - ReuseValues copies values from the current release to a new release if the - new release does not have any values. If the request already has values, - or if there are no values in the current release, this does nothing. - This is skipped if the ResetValues flag is set, in which case the - request values are not altered. - type: boolean - subNotes: - default: false - description: SubNotes determines whether sub-notes are rendered in the chart. - type: boolean - upgradeCRDs: - default: false - description: |- - UpgradeCRDs upgrade CRDs from the Helm Chart's crds directory - By default, CRDs are not applied during Helm upgrade action by Helm - https://helm.sh/docs/chart_best_practices/custom_resource_definitions/ - type: boolean - type: object - wait: - default: false - description: |- - if set, will wait until all Pods, PVCs, Services, and minimum number of Pods of a Deployment, StatefulSet, or ReplicaSet - are in a ready state before marking the release as successful. It will wait for as long as --timeout - Default to false - type: boolean - waitForJobs: - default: false - description: |- - if set and --wait enabled, will wait until all Jobs have been completed before marking the release as successful. - It will wait for as long as --timeout - Default to false - type: boolean - type: object - releaseName: - description: ReleaseName is the chart release - minLength: 1 - type: string - releaseNamespace: - description: ReleaseNamespace is the namespace release will be installed - minLength: 1 - type: string - repositoryName: - description: RepositoryName is the name helm chart repository - minLength: 1 - type: string - repositoryURL: - description: RepositoryURL is the URL helm chart repository - minLength: 1 - type: string - values: - description: |- - Values field allows to define configuration for the Helm release. - These values can be static or leverage Go templates for dynamic customization. - When expressed as templates, the values are filled in using information from - resources within the management cluster before deployment. - type: string - valuesFrom: - description: |- - ValuesFrom can reference ConfigMap/Secret instances. Within the ConfigMap or Secret data, - it is possible to store configuration for the Helm release. - These values can be static or leverage Go templates for dynamic customization. - When expressed as templates, the values are filled in using information from - resources within the management cluster before deployment. - items: - properties: - kind: - description: |- - Kind of the resource. Supported kinds are: - - ConfigMap/Secret - enum: - - ConfigMap - - Secret - type: string - name: - description: Name of the referenced resource. - minLength: 1 - type: string - namespace: - description: |- - Namespace of the referenced resource. - For ClusterProfile namespace can be left empty. In such a case, namespace will - be implicit set to cluster's namespace. - For Profile namespace must be left empty. The Profile namespace will be used. - type: string - required: - - kind - - name - - namespace - type: object - type: array - required: - - chartName - - chartVersion - - releaseName - - releaseNamespace - - repositoryName - - repositoryURL - type: object - type: array - kustomizationRefs: - description: |- - Kustomization refs is a list of kustomization paths. Kustomization will - be run on those paths and the outcome will be deployed. - items: - properties: - deploymentType: - default: Remote - description: |- - DeploymentType indicates whether resources need to be deployed - into the management cluster (local) or the managed cluster (remote) - enum: - - Local - - Remote - type: string - kind: - description: |- - Kind of the resource. Supported kinds are: - - flux GitRepository;OCIRepository;Bucket - - ConfigMap/Secret - enum: - - GitRepository - - OCIRepository - - Bucket - - ConfigMap - - Secret - type: string - name: - description: Name of the referenced resource. - minLength: 1 - type: string - namespace: - description: |- - Namespace of the referenced resource. - For ClusterProfile namespace can be left empty. In such a case, namespace will - be implicit set to cluster's namespace. - For Profile namespace must be left empty. The Profile namespace will be used. - type: string - path: - description: |- - Path to the directory containing the kustomization.yaml file, or the - set of plain YAMLs a kustomization.yaml should be generated for. - Defaults to 'None', which translates to the root path of the SourceRef. - type: string - targetNamespace: - description: |- - TargetNamespace sets or overrides the namespace in the - kustomization.yaml file. - maxLength: 63 - minLength: 1 - type: string - values: - additionalProperties: - type: string - description: |- - Values is a map[string]string type that allows to define a set of key-value pairs. - These key-value pairs can optionally leverage Go templates for further processing. - With Sveltos, you can define key-value pairs where the values can be Go templates. - These templates have access to management cluster information during deployment. This allows - to do more than just replace placeholders. Variables can be used to dynamically - construct values based on other resources or variables within the Kustomize output. - For example, imagine you have a Region key with a template value like: - '{{ index .Cluster.metadata.labels "region" }}'. - This template retrieves the region label from the cluster instance metadata. - Finally, Sveltos uses these processed values to fill placeholders in the Kustomize output. - The output itself can also contain templates, like: - region: '{{ default "west" .Region }}'. - This way, the final output from Kustomize will have the region set dynamically based on - the actual region retrieved earlier. - type: object - valuesFrom: - description: |- - ValuesFrom can reference ConfigMap/Secret instances. Within the ConfigMap or Secret data, - it is possible to define key-value pairs. These key-value pairs can optionally leverage - Go templates for further processing. - With Sveltos, you can define key-value pairs where the values can be Go templates. - These templates have access to management cluster information during deployment. This allows - to do more than just replace placeholders. Variables can be used to dynamically - construct values based on other resources or variables within the Kustomize output. - For example, imagine you have a Region key with a template value like: - '{{ index .Cluster.metadata.labels "region" }}'. - This template retrieves the region label from the cluster instance metadata. - Finally, Sveltos uses these processed values to fill placeholders in the Kustomize output. - The output itself can also contain templates, like: - region: '{{ default "west" .Region }}'. - This way, the final output from Kustomize will have the region set dynamically based on - the actual region retrieved earlier. - items: - properties: - kind: - description: |- - Kind of the resource. Supported kinds are: - - ConfigMap/Secret - enum: - - ConfigMap - - Secret - type: string - name: - description: Name of the referenced resource. - minLength: 1 - type: string - namespace: - description: |- - Namespace of the referenced resource. - For ClusterProfile namespace can be left empty. In such a case, namespace will - be implicit set to cluster's namespace. - For Profile namespace must be left empty. The Profile namespace will be used. - type: string - required: - - kind - - name - - namespace - type: object - type: array - required: - - kind - - name - - namespace - type: object - type: array - maxUpdate: - anyOf: - - type: integer - - type: string - description: |- - The maximum number of clusters that can be updated concurrently. - Value can be an absolute number (ex: 5) or a percentage of desired cluster (ex: 10%). - Defaults to 100%. - Example: when this is set to 30%, when list of add-ons/applications in ClusterProfile - changes, only 30% of matching clusters will be updated in parallel. Only when updates - in those cluster succeed, other matching clusters are updated. - pattern: ^((100|[0-9]{1,2})%|[0-9]+)$ - x-kubernetes-int-or-string: true - policyRefs: - description: |- - PolicyRefs references all the ConfigMaps/Secrets containing kubernetes resources - that need to be deployed in the matching CAPI clusters. - items: - properties: - deploymentType: - default: Remote - description: |- - DeploymentType indicates whether resources need to be deployed - into the management cluster (local) or the managed cluster (remote) - enum: - - Local - - Remote - type: string - kind: - description: |- - Kind of the resource. Supported kinds are: - - ConfigMap/Secret - - flux GitRepository;OCIRepository;Bucket - enum: - - GitRepository - - OCIRepository - - Bucket - - ConfigMap - - Secret - type: string - name: - description: Name of the referenced resource. - minLength: 1 - type: string - namespace: - description: |- - Namespace of the referenced resource. - For ClusterProfile namespace can be left empty. In such a case, namespace will - be implicit set to cluster's namespace. - For Profile namespace must be left empty. Profile namespace will be used. - type: string - path: - description: |- - Path to the directory containing the YAML files. - Defaults to 'None', which translates to the root path of the SourceRef. - Used only for GitRepository;OCIRepository;Bucket - type: string - required: - - kind - - name - type: object - type: array - reloader: - default: false - description: |- - Reloader indicates whether Deployment/StatefulSet/DaemonSet instances deployed - by Sveltos and part of this ClusterProfile need to be restarted via rolling upgrade - when a ConfigMap/Secret instance mounted as volume is modified. - When set to true, when any mounted ConfigMap/Secret is modified, Sveltos automatically - starts a rolling upgrade for Deployment/StatefulSet/DaemonSet instances mounting it. - type: boolean - setRefs: - description: |- - SetRefs identifies referenced (cluster)Sets. - - ClusterProfile can reference ClusterSet; - - Profile can reference Set; - items: - type: string - type: array - stopMatchingBehavior: - default: WithdrawPolicies - description: |- - StopMatchingBehavior indicates what behavior should be when a Cluster stop matching - the ClusterProfile. By default all deployed Helm charts and Kubernetes resources will - be withdrawn from Cluster. Setting StopMatchingBehavior to LeavePolicies will instead - leave ClusterProfile deployed policies in the Cluster. - enum: - - WithdrawPolicies - - LeavePolicies - type: string - syncMode: - default: Continuous - description: |- - SyncMode specifies how features are synced in a matching workload cluster. - - OneTime means, first time a workload cluster matches the ClusterProfile, - features will be deployed in such cluster. Any subsequent feature configuration - change won't be applied into the matching workload clusters; - - Continuous mode ensures that the first time a workload cluster matches a ClusterProfile, - the specified features are deployed. Subsequent changes to the feature configuration are also - automatically applied to all matching workload clusters. - _ SyncModeContinuousWithDriftDetection operates similarly to Continuous mode, but also monitors - matching managed clusters for configuration drift. If drift is detected, a reconciliation is - triggered to ensure the managed cluster's configuration aligns with the ClusterProfile. - - DryRun means no change will be propagated to any matching cluster. A report - instead will be generated summarizing what would happen in any matching cluster - because of the changes made to ClusterProfile while in DryRun mode. - enum: - - OneTime - - Continuous - - ContinuousWithDriftDetection - - DryRun - type: string - templateResourceRefs: - description: |- - TemplateResourceRefs is a list of resource to collect from the management cluster. - Those resources' values will be used to instantiate templates contained in referenced - PolicyRefs and Helm charts - items: - properties: - identifier: - description: |- - Identifier is how the resource will be referred to in the - template - type: string - resource: - description: |- - Resource references a Kubernetes instance in the management - cluster to fetch and use during template instantiation. - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: |- - If referring to a piece of an object instead of an entire object, this string - should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within a pod, this would take on a value like: - "spec.containers{name}" (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" (container with - index 2 in this pod). This syntax is chosen only to have some well-defined way of - referencing a part of an object. - type: string - kind: - description: |- - Kind of the referent. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - name: - description: |- - Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - namespace: - description: |- - Namespace of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - type: string - resourceVersion: - description: |- - Specific resourceVersion to which this reference is made, if any. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency - type: string - uid: - description: |- - UID of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - type: string - type: object - x-kubernetes-map-type: atomic - required: - - identifier - - resource - type: object - type: array - x-kubernetes-list-map-keys: - - identifier - x-kubernetes-list-type: map - tier: - default: 100 - description: |- - Tier controls the order of deployment for ClusterProfile or Profile resources targeting - the same cluster resources. - Imagine two configurations (ClusterProfiles or Profiles) trying to deploy the same resource (a Kubernetes - resource or an helm chart). By default, the first one to reach the cluster "wins" and deploys it. - Tier allows you to override this. When conflicts arise, the ClusterProfile or Profile with the **lowest** - Tier value takes priority and deploys the resource. - Higher Tier values represent lower priority. The default Tier value is 100. - Using Tiers provides finer control over resource deployment within your cluster, particularly useful - when multiple configurations manage the same resources. - format: int32 - minimum: 1 - type: integer - validateHealths: - description: |- - ValidateHealths is a slice of Lua functions to run against - the managed cluster to validate the state of those add-ons/applications - is healthy - items: - properties: - featureID: - description: |- - FeatureID is an indentifier of the feature (Helm/Kustomize/Resources) - This field indicates when to run this check. - For instance: - - if set to Helm this check will be run after all helm - charts specified in the ClusterProfile are deployed. - - if set to Resources this check will be run after the content - of all the ConfigMaps/Secrets referenced by ClusterProfile in the - PolicyRef sections is deployed - enum: - - Resources - - Helm - - Kustomize - type: string - group: - description: Group of the resource to fetch in the managed Cluster. - type: string - kind: - description: Kind of the resource to fetch in the managed Cluster. - minLength: 1 - type: string - labelFilters: - description: LabelFilters allows to filter resources based on current labels. - items: - properties: - key: - description: Key is the label key - type: string - operation: - description: Operation is the comparison operation - enum: - - Equal - - Different - type: string - value: - description: Value is the label value - type: string - required: - - key - - operation - - value - type: object - type: array - name: - description: Name is the name of this check - type: string - namespace: - description: |- - Namespace of the resource to fetch in the managed Cluster. - Empty for resources scoped at cluster level. - type: string - script: - description: |- - Script is a text containing a lua script. - Must return struct with field "health" - representing whether object is a match (true or false) - type: string - version: - description: Version of the resource to fetch in the managed Cluster. - type: string - required: - - featureID - - group - - kind - - name - - version - type: object - type: array - type: object - clusterType: - description: ClusterType is the type of Cluster - type: string - required: - - clusterName - - clusterNamespace - - clusterType - type: object - status: - description: ClusterSummaryStatus defines the observed state of ClusterSummary - properties: - dependencies: - description: |- - Dependencies is a summary reporting the status of the dependencies - for the associated ClusterProfile - type: string - deployedGVKs: - description: |- - DeployedGVKs reports the list of GVKs deployed by ClusterSummary - in a managed cluster - items: - properties: - deployedGroupVersionKind: - description: |- - DeployedGroupVersionKind contains all GroupVersionKinds deployed in either - the workload cluster or the management cluster because of this feature. - Each element has format kind.version.group - items: - type: string - type: array - featureID: - description: FeatureID is an indentifier of the feature whose status is reported - enum: - - Resources - - Helm - - Kustomize - type: string - required: - - featureID - type: object - type: array - x-kubernetes-list-map-keys: - - featureID - x-kubernetes-list-type: map - featureSummaries: - description: |- - FeatureSummaries reports the status of each workload cluster feature - directly managed by ClusterProfile. - items: - description: |- - FeatureSummary contains a summary of the state of a workload - cluster feature. - properties: - deployedGroupVersionKind: - description: |- - DeployedGroupVersionKind contains all GroupVersionKinds deployed in either - the workload cluster or the management cluster because of this feature. - Each element has format kind.version.group - Deprecated: Replaced by FeatureDeploymentInfo field instead - items: - type: string - type: array - failureMessage: - description: FailureMessage provides more information about the error. - type: string - failureReason: - description: FailureReason indicates the type of error that occurred. - type: string - featureID: - description: FeatureID is an indentifier of the feature whose status is reported - enum: - - Resources - - Helm - - Kustomize - type: string - hash: - description: |- - Hash represents of a unique value for a feature at a fixed point in - time - format: byte - type: string - lastAppliedTime: - description: LastAppliedTime is the time feature was last reconciled - format: date-time - type: string - status: - description: Status represents the state of the feature in the workload cluster - enum: - - Provisioning - - Provisioned - - Failed - - FailedNonRetriable - - Removing - - Removed - type: string - required: - - featureID - type: object - type: array - x-kubernetes-list-map-keys: - - featureID - x-kubernetes-list-type: map - helmReleaseSummaries: - description: |- - HelmReleaseSummaries reports the status of each helm chart - directly managed by ClusterProfile. - items: - properties: - conflictMessage: - description: |- - Status indicates whether ClusterSummary can manage the helm - chart or there is a conflict - type: string - releaseName: - description: ReleaseName is the chart release - minLength: 1 - type: string - releaseNamespace: - description: ReleaseNamespace is the namespace release will be installed - minLength: 1 - type: string - status: - description: |- - Status indicates whether ClusterSummary can manage the helm - chart or there is a conflict - enum: - - Managing - - Conflict - type: string - valuesHash: - description: ValuesHash represents of a unique value for the values section - format: byte - type: string - required: - - releaseName - - releaseNamespace - - status - type: object - type: array - x-kubernetes-list-type: atomic - type: object - type: object - served: true - storage: false - subresources: - status: {} - additionalPrinterColumns: - description: Time duration since creation of ClusterSummary jsonPath: .metadata.creationTimestamp @@ -1606,6 +704,13 @@ spec: - namespace type: object type: array + maxConsecutiveFailures: + description: |- + The maximum number of consecutive deployment failures that Sveltos will permit. + After this many consecutive failures, the deployment will be considered failed, and Sveltos will stop retrying. + This setting applies only to feature deployments, not resource removal. + This field is optional. If not set, Sveltos default behavior is to keep retrying. + type: integer maxUpdate: anyOf: - type: integer @@ -2003,6 +1108,9 @@ spec: FeatureSummary contains a summary of the state of a workload cluster feature. properties: + consecutiveFailures: + description: The number of consecutive deployment failures. + type: integer deployedGroupVersionKind: description: |- DeployedGroupVersionKind contains all GroupVersionKinds deployed in either diff --git a/templates/provider/kcm/projectsveltos-crds/debuggingconfigurations.lib.projectsveltos.io.yaml b/templates/provider/kcm/projectsveltos-crds/debuggingconfigurations.lib.projectsveltos.io.yaml index 0e5d30679..3fd452359 100644 --- a/templates/provider/kcm/projectsveltos-crds/debuggingconfigurations.lib.projectsveltos.io.yaml +++ b/templates/provider/kcm/projectsveltos-crds/debuggingconfigurations.lib.projectsveltos.io.yaml @@ -14,67 +14,6 @@ spec: singular: debuggingconfiguration scope: Cluster versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - description: DebuggingConfiguration is the Schema for the debuggingconfigurations 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: DebuggingConfigurationSpec defines the desired state of DebuggingConfiguration - properties: - configuration: - description: Configuration contains debugging configuration as granular as per component. - items: - description: ComponentConfiguration is the debugging configuration to be applied to a Sveltos component. - properties: - component: - description: Component indicates which Sveltos component the configuration applies to. - enum: - - AddonManager - - Classifier - - ClassifierAgent - - SveltosClusterManager - - DriftDetectionManager - - AccessManager - - HealthCheckManager - - EventManager - - ShardController - - UIBackend - type: string - logLevel: - description: 'LogLevel is the log severity above which logs are sent to the stdout. [Default: Info]' - enum: - - LogLevelNotSet - - LogLevelInfo - - LogLevelDebug - - LogLevelVerbose - type: string - required: - - component - type: object - type: array - x-kubernetes-list-type: atomic - type: object - type: object - served: true - storage: false - name: v1beta1 schema: openAPIV3Schema: diff --git a/templates/provider/kcm/projectsveltos-crds/eventreports.lib.projectsveltos.io.yaml b/templates/provider/kcm/projectsveltos-crds/eventreports.lib.projectsveltos.io.yaml index a12a652b5..5e576a2c9 100644 --- a/templates/provider/kcm/projectsveltos-crds/eventreports.lib.projectsveltos.io.yaml +++ b/templates/provider/kcm/projectsveltos-crds/eventreports.lib.projectsveltos.io.yaml @@ -14,124 +14,6 @@ spec: singular: eventreport scope: Namespaced versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - description: EventReport is the Schema for the EventReport 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: - properties: - clusterName: - description: |- - ClusterName is the name of the Cluster this EventReport - is for. - type: string - clusterNamespace: - description: |- - ClusterNamespace is the namespace of the Cluster this - EventReport is for. - type: string - clusterType: - description: |- - ClusterType is the type of Cluster this EventReport - is for. - type: string - eventSourceName: - description: |- - EventSourceName is the name of the EventSource instance this report - is for. - type: string - matchingResources: - description: MatchingResources contains a list of resources matching an event - items: - description: ObjectReference contains enough information to let you inspect or modify the referred object. - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: |- - If referring to a piece of an object instead of an entire object, this string - should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within a pod, this would take on a value like: - "spec.containers{name}" (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" (container with - index 2 in this pod). This syntax is chosen only to have some well-defined way of - referencing a part of an object. - type: string - kind: - description: |- - Kind of the referent. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - name: - description: |- - Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - namespace: - description: |- - Namespace of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - type: string - resourceVersion: - description: |- - Specific resourceVersion to which this reference is made, if any. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency - type: string - uid: - description: |- - UID of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - type: string - type: object - x-kubernetes-map-type: atomic - type: array - resources: - description: |- - If EventSource Spec.CollectResources is set to true, all matching resources - will be collected and contained in the Resources field. - format: byte - type: string - required: - - clusterName - - clusterNamespace - - clusterType - - eventSourceName - type: object - status: - description: EventReportStatus defines the observed state of EventReport - properties: - phase: - description: Phase represents the current phase of report. - enum: - - WaitingForDelivery - - Delivering - - Processed - type: string - type: object - type: object - served: true - storage: false - subresources: - status: {} - name: v1beta1 schema: openAPIV3Schema: diff --git a/templates/provider/kcm/projectsveltos-crds/eventsources.lib.projectsveltos.io.yaml b/templates/provider/kcm/projectsveltos-crds/eventsources.lib.projectsveltos.io.yaml index 096bcfb7f..ad7636dac 100644 --- a/templates/provider/kcm/projectsveltos-crds/eventsources.lib.projectsveltos.io.yaml +++ b/templates/provider/kcm/projectsveltos-crds/eventsources.lib.projectsveltos.io.yaml @@ -14,118 +14,6 @@ spec: singular: eventsource scope: Cluster versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - description: EventSource is the Schema for the EventSource 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: EventSourceSpec defines the desired state of EventSource - properties: - aggregatedSelection: - description: |- - This field is optional and can be used to specify a Lua function - that will be used to further select a subset of the resources that - have already been selected using the ResourceSelector field. - The function will receive the array of resources selected by ResourceSelectors. - If this field is not specified, all resources selected by the ResourceSelector - field will be considered. - This field allows to perform more complex filtering or selection operations - on the resources, looking at all resources together. - This can be useful for more sophisticated tasks, such as identifying resources - that are related to each other or that have similar properties. - The Lua function must return a struct with: - - "resources" field: slice of matching resorces; - - "message" field: (optional) message. - type: string - collectResources: - default: false - description: |- - CollectResources indicates whether matching resources need - to be collected and added to EventReport. - type: boolean - resourceSelectors: - description: ResourceSelectors identifies what resources to select - items: - description: ResourceSelector defines what resources are a match - properties: - evaluate: - description: |- - Evaluate contains a function "evaluate" in lua language. - The function will be passed one of the object selected based on - above criteria. - Must return struct with field "matching" representing whether - object is a match and an optional "message" field. - type: string - group: - description: Group of the resource deployed in the Cluster. - type: string - kind: - description: Kind of the resource deployed in the Cluster. - minLength: 1 - type: string - labelFilters: - description: LabelFilters allows to filter resources based on current labels. - items: - properties: - key: - description: Key is the label key - type: string - operation: - description: Operation is the comparison operation - enum: - - Equal - - Different - type: string - value: - description: Value is the label value - type: string - required: - - key - - operation - - value - type: object - type: array - name: - description: Name of the resource deployed in the Cluster. - type: string - namespace: - description: |- - Namespace of the resource deployed in the Cluster. - Empty for resources scoped at cluster level. - type: string - version: - description: Version of the resource deployed in the Cluster. - type: string - required: - - group - - kind - - version - type: object - type: array - required: - - resourceSelectors - type: object - type: object - served: true - storage: false - name: v1beta1 schema: openAPIV3Schema: diff --git a/templates/provider/kcm/projectsveltos-crds/eventtriggers.lib.projectsveltos.io.yaml b/templates/provider/kcm/projectsveltos-crds/eventtriggers.lib.projectsveltos.io.yaml index ad644a5be..676cd30e9 100644 --- a/templates/provider/kcm/projectsveltos-crds/eventtriggers.lib.projectsveltos.io.yaml +++ b/templates/provider/kcm/projectsveltos-crds/eventtriggers.lib.projectsveltos.io.yaml @@ -3,20 +3,9 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - cert-manager.io/inject-ca-from: projectsveltos/projectsveltos-serving-cert controller-gen.kubebuilder.io/version: v0.17.2 name: eventtriggers.lib.projectsveltos.io spec: - conversion: - strategy: Webhook - webhook: - clientConfig: - service: - name: webhook-service - namespace: projectsveltos - path: /convert - conversionReviewVersions: - - v1 group: lib.projectsveltos.io names: kind: EventTrigger @@ -25,881 +14,6 @@ spec: singular: eventtrigger scope: Cluster versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - description: EventTrigger is the Schema for the eventtriggers 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: EventTriggerSpec defines the desired state of EventTrigger - properties: - clusterSetRefs: - description: SetRefs identifies referenced ClusterSets. Name of the referenced ClusterSets. - items: - type: string - type: array - continueOnConflict: - default: false - description: |- - By default (when ContinueOnConflict is unset or set to false), Sveltos stops deployment after - encountering the first conflict (e.g., another ClusterProfile already deployed the resource). - If set to true, Sveltos will attempt to deploy remaining resources in the ClusterProfile even - if conflicts are detected for previous resources. - type: boolean - destinationClusterSelector: - description: |- - DestinationClusterSelector identifies the cluster where add-ons will be deployed. - By default, this is nil and add-ons will be deployed in the very same cluster the - event happened. - If DestinationClusterSelector is set though, when an event happens in any of the - cluster identified by SourceClusterSelector, add-ons will be deployed in each of - the cluster indentified by DestinationClusterSelector. - type: string - eventSourceName: - description: |- - EventSourceName is the name of the referenced EventSource. - Resources contained in the referenced ConfigMaps/Secrets and HelmCharts - will be customized using information from resources matching the EventSource - in the managed cluster. - type: string - extraAnnotations: - additionalProperties: - type: string - description: |- - ExtraAnnotations: These annotations will be added by Sveltos to all Kubernetes resources - deployed in a managed cluster based on this ClusterProfile/Profile instance. - **Important:** If a resource deployed by Sveltos already has a annotation with a key present in - `ExtraAnnotations`, the value from `ExtraAnnotations` will override the existing value. - type: object - extraLabels: - additionalProperties: - type: string - description: |- - ExtraLabels: These labels will be added by Sveltos to all Kubernetes resources deployed in - a managed cluster based on this ClusterProfile/Profile instance. - **Important:** If a resource deployed by Sveltos already has a label with a key present in - `ExtraLabels`, the value from `ExtraLabels` will override the existing value. - type: object - helmCharts: - description: Helm charts to be deployed in the matching clusters based on EventSource. - items: - properties: - chartName: - description: ChartName is the chart name - minLength: 1 - type: string - chartVersion: - description: ChartVersion is the chart version - minLength: 1 - type: string - helmChartAction: - default: Install - description: HelmChartAction is the action that will be taken on the helm chart - enum: - - Install - - Uninstall - type: string - options: - description: Options allows to set flags which are used during installation. - properties: - atomic: - default: false - description: |- - if set, the installation process deletes the installation/upgrades on failure. - The --wait flag will be set automatically if --atomic is used - Default to false - type: boolean - dependencyUpdate: - default: false - description: |- - update dependencies if they are missing before installing the chart - Default to false - type: boolean - description: - description: Description is the description of an helm operation - type: string - disableHooks: - default: false - description: |- - prevent hooks from running during install/upgrade/uninstall - Default to false - type: boolean - disableOpenAPIValidation: - default: false - description: |- - if set, the installation process will not validate rendered templates against the Kubernetes OpenAPI Schema - Default to false - type: boolean - enableClientCache: - default: false - description: EnableClientCache is a flag to enable Helm client cache. If it is not specified, it will be set to false. - type: boolean - installOptions: - description: HelmInstallOptions are options specific to helm install - properties: - createNamespace: - default: true - description: Create the release namespace if not present. Defaults to true - type: boolean - replace: - default: true - description: Replaces if set indicates to replace an older release with this one - type: boolean - type: object - labels: - additionalProperties: - type: string - description: Labels that would be added to release metadata. - type: object - skipCRDs: - default: false - description: |- - SkipCRDs controls whether CRDs should be installed during install/upgrade operation. - By default, CRDs are installed if not already present. - type: boolean - skipSchemaValidation: - default: false - description: SkipSchemaValidation determines if JSON schema validation is disabled. - type: boolean - timeout: - description: time to wait for any individual Kubernetes operation (like Jobs for hooks) (default 5m0s) - type: string - uninstallOptions: - description: HelmUninstallOptions are options specific to helm uninstall - properties: - deletionPropagation: - description: DeletionPropagation - enum: - - orphan - - foreground - - background - type: string - keepHistory: - description: |- - When uninstall a chart with this flag, Helm removes the resources associated with the chart, - but it keeps the release information. This allows to see details about the uninstalled release - using the helm history command. - type: boolean - type: object - upgradeOptions: - description: HelmUpgradeOptions are options specific to helm upgrade - properties: - cleanupOnFail: - default: false - description: CleanupOnFail will, if true, cause the upgrade to delete newly-created resources on a failed update. - type: boolean - force: - default: false - description: |- - Force will, if set to `true`, ignore certain warnings and perform the upgrade anyway. - This should be used with caution. - type: boolean - maxHistory: - default: 2 - description: |- - MaxHistory limits the maximum number of revisions saved per release - Default to 2 - type: integer - recreate: - default: false - description: Recreate will (if true) recreate pods after a rollback. - type: boolean - resetThenReuseValues: - default: false - description: ResetThenReuseValues will reset the values to the chart's built-ins then merge with user's last supplied values. - type: boolean - resetValues: - default: false - description: ResetValues will reset the values to the chart's built-ins rather than merging with existing. - type: boolean - reuseValues: - default: false - description: |- - ReuseValues copies values from the current release to a new release if the - new release does not have any values. If the request already has values, - or if there are no values in the current release, this does nothing. - This is skipped if the ResetValues flag is set, in which case the - request values are not altered. - type: boolean - subNotes: - default: false - description: SubNotes determines whether sub-notes are rendered in the chart. - type: boolean - upgradeCRDs: - default: false - description: |- - UpgradeCRDs upgrade CRDs from the Helm Chart's crds directory - By default, CRDs are not applied during Helm upgrade action by Helm - https://helm.sh/docs/chart_best_practices/custom_resource_definitions/ - type: boolean - type: object - wait: - default: false - description: |- - if set, will wait until all Pods, PVCs, Services, and minimum number of Pods of a Deployment, StatefulSet, or ReplicaSet - are in a ready state before marking the release as successful. It will wait for as long as --timeout - Default to false - type: boolean - waitForJobs: - default: false - description: |- - if set and --wait enabled, will wait until all Jobs have been completed before marking the release as successful. - It will wait for as long as --timeout - Default to false - type: boolean - type: object - releaseName: - description: ReleaseName is the chart release - minLength: 1 - type: string - releaseNamespace: - description: ReleaseNamespace is the namespace release will be installed - minLength: 1 - type: string - repositoryName: - description: RepositoryName is the name helm chart repository - minLength: 1 - type: string - repositoryURL: - description: RepositoryURL is the URL helm chart repository - minLength: 1 - type: string - values: - description: |- - Values field allows to define configuration for the Helm release. - These values can be static or leverage Go templates for dynamic customization. - When expressed as templates, the values are filled in using information from - resources within the management cluster before deployment. - type: string - valuesFrom: - description: |- - ValuesFrom can reference ConfigMap/Secret instances. Within the ConfigMap or Secret data, - it is possible to store configuration for the Helm release. - These values can be static or leverage Go templates for dynamic customization. - When expressed as templates, the values are filled in using information from - resources within the management cluster before deployment. - items: - properties: - kind: - description: |- - Kind of the resource. Supported kinds are: - - ConfigMap/Secret - enum: - - ConfigMap - - Secret - type: string - name: - description: Name of the referenced resource. - minLength: 1 - type: string - namespace: - description: |- - Namespace of the referenced resource. - For ClusterProfile namespace can be left empty. In such a case, namespace will - be implicit set to cluster's namespace. - For Profile namespace must be left empty. The Profile namespace will be used. - type: string - required: - - kind - - name - - namespace - type: object - type: array - required: - - chartName - - chartVersion - - releaseName - - releaseNamespace - - repositoryName - - repositoryURL - type: object - type: array - kustomizationRefs: - description: Kustomization refs - items: - properties: - deploymentType: - default: Remote - description: |- - DeploymentType indicates whether resources need to be deployed - into the management cluster (local) or the managed cluster (remote) - enum: - - Local - - Remote - type: string - kind: - description: |- - Kind of the resource. Supported kinds are: - - flux GitRepository;OCIRepository;Bucket - - ConfigMap/Secret - enum: - - GitRepository - - OCIRepository - - Bucket - - ConfigMap - - Secret - type: string - name: - description: Name of the referenced resource. - minLength: 1 - type: string - namespace: - description: |- - Namespace of the referenced resource. - For ClusterProfile namespace can be left empty. In such a case, namespace will - be implicit set to cluster's namespace. - For Profile namespace must be left empty. The Profile namespace will be used. - type: string - path: - description: |- - Path to the directory containing the kustomization.yaml file, or the - set of plain YAMLs a kustomization.yaml should be generated for. - Defaults to 'None', which translates to the root path of the SourceRef. - type: string - targetNamespace: - description: |- - TargetNamespace sets or overrides the namespace in the - kustomization.yaml file. - maxLength: 63 - minLength: 1 - type: string - values: - additionalProperties: - type: string - description: |- - Values is a map[string]string type that allows to define a set of key-value pairs. - These key-value pairs can optionally leverage Go templates for further processing. - With Sveltos, you can define key-value pairs where the values can be Go templates. - These templates have access to management cluster information during deployment. This allows - to do more than just replace placeholders. Variables can be used to dynamically - construct values based on other resources or variables within the Kustomize output. - For example, imagine you have a Region key with a template value like: - '{{ index .Cluster.metadata.labels "region" }}'. - This template retrieves the region label from the cluster instance metadata. - Finally, Sveltos uses these processed values to fill placeholders in the Kustomize output. - The output itself can also contain templates, like: - region: '{{ default "west" .Region }}'. - This way, the final output from Kustomize will have the region set dynamically based on - the actual region retrieved earlier. - type: object - valuesFrom: - description: |- - ValuesFrom can reference ConfigMap/Secret instances. Within the ConfigMap or Secret data, - it is possible to define key-value pairs. These key-value pairs can optionally leverage - Go templates for further processing. - With Sveltos, you can define key-value pairs where the values can be Go templates. - These templates have access to management cluster information during deployment. This allows - to do more than just replace placeholders. Variables can be used to dynamically - construct values based on other resources or variables within the Kustomize output. - For example, imagine you have a Region key with a template value like: - '{{ index .Cluster.metadata.labels "region" }}'. - This template retrieves the region label from the cluster instance metadata. - Finally, Sveltos uses these processed values to fill placeholders in the Kustomize output. - The output itself can also contain templates, like: - region: '{{ default "west" .Region }}'. - This way, the final output from Kustomize will have the region set dynamically based on - the actual region retrieved earlier. - items: - properties: - kind: - description: |- - Kind of the resource. Supported kinds are: - - ConfigMap/Secret - enum: - - ConfigMap - - Secret - type: string - name: - description: Name of the referenced resource. - minLength: 1 - type: string - namespace: - description: |- - Namespace of the referenced resource. - For ClusterProfile namespace can be left empty. In such a case, namespace will - be implicit set to cluster's namespace. - For Profile namespace must be left empty. The Profile namespace will be used. - type: string - required: - - kind - - name - - namespace - type: object - type: array - required: - - kind - - name - - namespace - type: object - type: array - maxUpdate: - anyOf: - - type: integer - - type: string - description: |- - The maximum number of clusters that can be updated concurrently. - Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). - Defaults to 100%. - Example: when this is set to 30%, when list of add-ons/applications in ClusterProfile - changes, only 30% of matching clusters will be updated in parallel. Only when updates - in those cluster succeed, other matching clusters are updated. - pattern: ^((100|[0-9]{1,2})%|[0-9]+)$ - x-kubernetes-int-or-string: true - oneForEvent: - description: |- - Multiple resources in a managed cluster can be a match for referenced - EventSource. OneForEvent indicates whether a ClusterProfile for all - resource (OneForEvent = false) or one per resource (OneForEvent = true) - needs to be creted. - type: boolean - policyRefs: - description: |- - PolicyRefs references all the ConfigMaps/Secrets containing kubernetes resources - that need to be deployed in the matching clusters based on EventSource. - items: - properties: - deploymentType: - default: Remote - description: |- - DeploymentType indicates whether resources need to be deployed - into the management cluster (local) or the managed cluster (remote) - enum: - - Local - - Remote - type: string - kind: - description: |- - Kind of the resource. Supported kinds are: - - ConfigMap/Secret - - flux GitRepository;OCIRepository;Bucket - enum: - - GitRepository - - OCIRepository - - Bucket - - ConfigMap - - Secret - type: string - name: - description: Name of the referenced resource. - minLength: 1 - type: string - namespace: - description: |- - Namespace of the referenced resource. - For ClusterProfile namespace can be left empty. In such a case, namespace will - be implicit set to cluster's namespace. - For Profile namespace must be left empty. Profile namespace will be used. - type: string - path: - description: |- - Path to the directory containing the YAML files. - Defaults to 'None', which translates to the root path of the SourceRef. - Used only for GitRepository;OCIRepository;Bucket - type: string - required: - - kind - - name - type: object - type: array - reloader: - default: false - description: |- - Reloader indicates whether Deployment/StatefulSet/DaemonSet instances deployed - by Sveltos and part of this ClusterProfile need to be restarted via rolling upgrade - when a ConfigMap/Secret instance mounted as volume is modified. - When set to true, when any mounted ConfigMap/Secret is modified, Sveltos automatically - starts a rolling upgrade for Deployment/StatefulSet/DaemonSet instances mounting it. - type: boolean - sourceClusterSelector: - description: |- - SourceClusterSelector identifies clusters to associate to. - This represents the set of clusters where Sveltos will watch for - events defined by referenced EventSource - type: string - stopMatchingBehavior: - default: WithdrawPolicies - description: |- - StopMatchingBehavior indicates what behavior should be when a Cluster stop matching - the ClusterProfile. By default all deployed Helm charts and Kubernetes resources will - be withdrawn from Cluster. Setting StopMatchingBehavior to LeavePolicies will instead - leave ClusterProfile deployed policies in the Cluster. - enum: - - WithdrawPolicies - - LeavePolicies - type: string - syncMode: - default: Continuous - description: |- - SyncMode specifies how features are synced in a matching workload cluster. - - OneTime means, first time a workload cluster matches the ClusterProfile, - features will be deployed in such cluster. Any subsequent feature configuration - change won't be applied into the matching workload clusters; - - Continuous mode ensures that the first time a workload cluster matches a ClusterProfile, - the specified features are deployed. Subsequent changes to the feature configuration are also - automatically applied to all matching workload clusters. - _ SyncModeContinuousWithDriftDetection operates similarly to Continuous mode, but also monitors - matching managed clusters for configuration drift. If drift is detected, a reconciliation is - triggered to ensure the managed cluster's configuration aligns with the ClusterProfile. - - DryRun means no change will be propagated to any matching cluster. A report - instead will be generated summarizing what would happen in any matching cluster - because of the changes made to ClusterProfile while in DryRun mode. - enum: - - OneTime - - Continuous - - ContinuousWithDriftDetection - - DryRun - type: string - templateResourceRefs: - description: |- - TemplateResourceRefs is a list of resource to collect from the management cluster. - Those resources' values will be used to instantiate templates contained in referenced - PolicyRefs and Helm charts - items: - properties: - identifier: - description: |- - Identifier is how the resource will be referred to in the - template - type: string - resource: - description: |- - Resource references a Kubernetes instance in the management - cluster to fetch and use during template instantiation. - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: |- - If referring to a piece of an object instead of an entire object, this string - should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within a pod, this would take on a value like: - "spec.containers{name}" (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" (container with - index 2 in this pod). This syntax is chosen only to have some well-defined way of - referencing a part of an object. - type: string - kind: - description: |- - Kind of the referent. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - name: - description: |- - Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - namespace: - description: |- - Namespace of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - type: string - resourceVersion: - description: |- - Specific resourceVersion to which this reference is made, if any. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency - type: string - uid: - description: |- - UID of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - type: string - type: object - x-kubernetes-map-type: atomic - required: - - identifier - - resource - type: object - type: array - tier: - default: 100 - description: |- - Tier controls the order of deployment for ClusterProfile or Profile resources targeting - the same cluster resources. - Imagine two configurations (ClusterProfiles or Profiles) trying to deploy the same resource (a Kubernetes - resource or an helm chart). By default, the first one to reach the cluster "wins" and deploys it. - Tier allows you to override this. When conflicts arise, the ClusterProfile or Profile with the **lowest** - Tier value takes priority and deploys the resource. - Higher Tier values represent lower priority. The default Tier value is 100. - Using Tiers provides finer control over resource deployment within your cluster, particularly useful - when multiple configurations manage the same resources. - format: int32 - minimum: 1 - type: integer - validateHealths: - description: |- - ValidateHealths is a slice of Lua functions to run against - the managed cluster to validate the state of those add-ons/applications - is healthy - items: - properties: - featureID: - description: |- - FeatureID is an indentifier of the feature (Helm/Kustomize/Resources) - This field indicates when to run this check. - For instance: - - if set to Helm this check will be run after all helm - charts specified in the ClusterProfile are deployed. - - if set to Resources this check will be run after the content - of all the ConfigMaps/Secrets referenced by ClusterProfile in the - PolicyRef sections is deployed - enum: - - Resources - - Helm - - Kustomize - type: string - group: - description: Group of the resource to fetch in the managed Cluster. - type: string - kind: - description: Kind of the resource to fetch in the managed Cluster. - minLength: 1 - type: string - labelFilters: - description: LabelFilters allows to filter resources based on current labels. - items: - properties: - key: - description: Key is the label key - type: string - operation: - description: Operation is the comparison operation - enum: - - Equal - - Different - type: string - value: - description: Value is the label value - type: string - required: - - key - - operation - - value - type: object - type: array - name: - description: Name is the name of this check - type: string - namespace: - description: |- - Namespace of the resource to fetch in the managed Cluster. - Empty for resources scoped at cluster level. - type: string - script: - description: |- - Script is a text containing a lua script. - Must return struct with field "health" - representing whether object is a match (true or false) - type: string - version: - description: Version of the resource to fetch in the managed Cluster. - type: string - required: - - featureID - - group - - kind - - name - - version - type: object - type: array - required: - - eventSourceName - - sourceClusterSelector - type: object - status: - description: EventTriggerStatus defines the observed state of EventTrigger - properties: - clusterInfo: - description: |- - ClusterInfo represent the deployment status in each managed - cluster. - items: - properties: - cluster: - description: Cluster references the Cluster - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: |- - If referring to a piece of an object instead of an entire object, this string - should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within a pod, this would take on a value like: - "spec.containers{name}" (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" (container with - index 2 in this pod). This syntax is chosen only to have some well-defined way of - referencing a part of an object. - type: string - kind: - description: |- - Kind of the referent. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - name: - description: |- - Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - namespace: - description: |- - Namespace of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - type: string - resourceVersion: - description: |- - Specific resourceVersion to which this reference is made, if any. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency - type: string - uid: - description: |- - UID of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - type: string - type: object - x-kubernetes-map-type: atomic - failureMessage: - description: FailureMessage provides more information about the error. - type: string - hash: - description: |- - Hash represents the hash of the Classifier currently deployed - in the Cluster - format: byte - type: string - status: - description: Status represents the state of the feature in the workload cluster - enum: - - Provisioning - - Provisioned - - Failed - - Removing - - Removed - type: string - required: - - cluster - - hash - type: object - type: array - destinationMatchingClusterRefs: - description: |- - DestinationMatchingClusterRefs reference all the cluster-api Cluster currently matching - ClusterProfile DestinationClusterSelector - items: - description: ObjectReference contains enough information to let you inspect or modify the referred object. - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: |- - If referring to a piece of an object instead of an entire object, this string - should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within a pod, this would take on a value like: - "spec.containers{name}" (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" (container with - index 2 in this pod). This syntax is chosen only to have some well-defined way of - referencing a part of an object. - type: string - kind: - description: |- - Kind of the referent. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - name: - description: |- - Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - namespace: - description: |- - Namespace of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - type: string - resourceVersion: - description: |- - Specific resourceVersion to which this reference is made, if any. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency - type: string - uid: - description: |- - UID of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - type: string - type: object - x-kubernetes-map-type: atomic - type: array - matchingClusters: - description: |- - MatchingClusterRefs reference all the cluster-api Cluster currently matching - ClusterProfile SourceClusterSelector - items: - description: ObjectReference contains enough information to let you inspect or modify the referred object. - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: |- - If referring to a piece of an object instead of an entire object, this string - should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within a pod, this would take on a value like: - "spec.containers{name}" (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" (container with - index 2 in this pod). This syntax is chosen only to have some well-defined way of - referencing a part of an object. - type: string - kind: - description: |- - Kind of the referent. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - name: - description: |- - Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - namespace: - description: |- - Namespace of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - type: string - resourceVersion: - description: |- - Specific resourceVersion to which this reference is made, if any. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency - type: string - uid: - description: |- - UID of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - type: string - type: object - x-kubernetes-map-type: atomic - type: array - type: object - type: object - served: true - storage: false - subresources: - status: {} - name: v1beta1 schema: openAPIV3Schema: diff --git a/templates/provider/kcm/projectsveltos-crds/healthcheckreports.lib.projectsveltos.io.yaml b/templates/provider/kcm/projectsveltos-crds/healthcheckreports.lib.projectsveltos.io.yaml index 81c6c1db4..34e0e67b2 100644 --- a/templates/provider/kcm/projectsveltos-crds/healthcheckreports.lib.projectsveltos.io.yaml +++ b/templates/provider/kcm/projectsveltos-crds/healthcheckreports.lib.projectsveltos.io.yaml @@ -14,141 +14,6 @@ spec: singular: healthcheckreport scope: Namespaced versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - description: HealthCheckReport is the Schema for the HealthCheckReport 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: - properties: - clusterName: - description: |- - ClusterName is the name of the Cluster this HealthCheckReport - is for. - type: string - clusterNamespace: - description: |- - ClusterNamespace is the namespace of the Cluster this - HealthCheckReport is for. - type: string - clusterType: - description: |- - ClusterType is the type of Cluster this HealthCheckReport - is for. - type: string - healthCheckName: - description: |- - HealthName is the name of the HealthCheck instance this report - is for. - type: string - resourceStatuses: - description: ResourceStatuses contains a list of resources with their status - items: - properties: - healthStatus: - description: HealthStatus is the health status of the object - enum: - - Healthy - - Progressing - - Degraded - - Suspended - type: string - message: - description: Message is an extra message for human consumption - type: string - objectRef: - description: ObjectRef for which status is reported - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: |- - If referring to a piece of an object instead of an entire object, this string - should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within a pod, this would take on a value like: - "spec.containers{name}" (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" (container with - index 2 in this pod). This syntax is chosen only to have some well-defined way of - referencing a part of an object. - type: string - kind: - description: |- - Kind of the referent. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - name: - description: |- - Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - namespace: - description: |- - Namespace of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - type: string - resourceVersion: - description: |- - Specific resourceVersion to which this reference is made, if any. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency - type: string - uid: - description: |- - UID of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - type: string - type: object - x-kubernetes-map-type: atomic - resource: - description: |- - If HealthCheck Spec.CollectResources is set to true, resource - will be collected and contained in the Resource field. - format: byte - type: string - required: - - healthStatus - - objectRef - type: object - type: array - required: - - clusterName - - clusterNamespace - - clusterType - - healthCheckName - type: object - status: - description: HealthCheckReportStatus defines the observed state of HealthCheckReport - properties: - phase: - description: Phase represents the current phase of report. - enum: - - WaitingForDelivery - - Delivering - - Processed - type: string - type: object - type: object - served: true - storage: false - subresources: - status: {} - name: v1beta1 schema: openAPIV3Schema: diff --git a/templates/provider/kcm/projectsveltos-crds/healthchecks.lib.projectsveltos.io.yaml b/templates/provider/kcm/projectsveltos-crds/healthchecks.lib.projectsveltos.io.yaml index 870117887..f1e24cd57 100644 --- a/templates/provider/kcm/projectsveltos-crds/healthchecks.lib.projectsveltos.io.yaml +++ b/templates/provider/kcm/projectsveltos-crds/healthchecks.lib.projectsveltos.io.yaml @@ -14,115 +14,6 @@ spec: singular: healthcheck scope: Cluster versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - description: HealthCheck is the Schema for the HealthCheck 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: HealthCheckSpec defines the desired state of HealthCheck - properties: - collectResources: - default: false - description: |- - CollectResources indicates whether matching resources need - to be collected and added to HealthReport. - type: boolean - evaluateHealth: - description: |- - The EvaluateHealth field specifies a Lua function responsible for evaluating the - health of the resources selected by resourceSelectors. - This function can assess the health of each resource independently or consider inter-resource relationships. - The function must be named *evaluate* and can access all objects identified by resourceSelectors using - the *resources* variable. It should return an array of structured instances, each containing the following fields: - - resource: The resource being evaluated - - healthStatus: The health status of the resource, which can be one of "Healthy", "Progressing", "Degraded", or "Suspended" - - message: An optional message providing additional information about the health status - minLength: 1 - type: string - resourceSelectors: - description: ResourceSelectors identifies what resources to select to evaluate health - items: - description: ResourceSelector defines what resources are a match - properties: - evaluate: - description: |- - Evaluate contains a function "evaluate" in lua language. - The function will be passed one of the object selected based on - above criteria. - Must return struct with field "matching" representing whether - object is a match and an optional "message" field. - type: string - group: - description: Group of the resource deployed in the Cluster. - type: string - kind: - description: Kind of the resource deployed in the Cluster. - minLength: 1 - type: string - labelFilters: - description: LabelFilters allows to filter resources based on current labels. - items: - properties: - key: - description: Key is the label key - type: string - operation: - description: Operation is the comparison operation - enum: - - Equal - - Different - type: string - value: - description: Value is the label value - type: string - required: - - key - - operation - - value - type: object - type: array - name: - description: Name of the resource deployed in the Cluster. - type: string - namespace: - description: |- - Namespace of the resource deployed in the Cluster. - Empty for resources scoped at cluster level. - type: string - version: - description: Version of the resource deployed in the Cluster. - type: string - required: - - group - - kind - - version - type: object - type: array - required: - - evaluateHealth - - resourceSelectors - type: object - type: object - served: true - storage: false - name: v1beta1 schema: openAPIV3Schema: diff --git a/templates/provider/kcm/projectsveltos-crds/profiles.config.projectsveltos.io.yaml b/templates/provider/kcm/projectsveltos-crds/profiles.config.projectsveltos.io.yaml index a0ba1ab04..b512200f6 100644 --- a/templates/provider/kcm/projectsveltos-crds/profiles.config.projectsveltos.io.yaml +++ b/templates/provider/kcm/projectsveltos-crds/profiles.config.projectsveltos.io.yaml @@ -3,20 +3,9 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - cert-manager.io/inject-ca-from: projectsveltos/projectsveltos-serving-cert controller-gen.kubebuilder.io/version: v0.17.2 name: profiles.config.projectsveltos.io spec: - conversion: - strategy: Webhook - webhook: - clientConfig: - service: - name: webhook-service - namespace: projectsveltos - path: /convert - conversionReviewVersions: - - v1 group: config.projectsveltos.io names: kind: Profile @@ -25,917 +14,6 @@ spec: singular: profile scope: Namespaced versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - description: Profile is the Schema for the profiles 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: - properties: - clusterRefs: - description: ClusterRefs identifies clusters to associate to. - items: - description: ObjectReference contains enough information to let you inspect or modify the referred object. - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: |- - If referring to a piece of an object instead of an entire object, this string - should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within a pod, this would take on a value like: - "spec.containers{name}" (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" (container with - index 2 in this pod). This syntax is chosen only to have some well-defined way of - referencing a part of an object. - type: string - kind: - description: |- - Kind of the referent. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - name: - description: |- - Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - namespace: - description: |- - Namespace of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - type: string - resourceVersion: - description: |- - Specific resourceVersion to which this reference is made, if any. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency - type: string - uid: - description: |- - UID of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - type: string - type: object - x-kubernetes-map-type: atomic - type: array - clusterSelector: - description: ClusterSelector identifies clusters to associate to. - type: string - continueOnConflict: - default: false - description: |- - By default (when ContinueOnConflict is unset or set to false), Sveltos stops deployment after - encountering the first conflict (e.g., another ClusterProfile already deployed the resource). - If set to true, Sveltos will attempt to deploy remaining resources in the ClusterProfile even - if conflicts are detected for previous resources. - type: boolean - dependsOn: - description: |- - DependsOn specifies a list of other ClusterProfiles that this instance depends on. - In any managed cluster that matches this ClusterProfile, the add-ons and applications - defined in this instance will not be deployed until all add-ons and applications in the - ClusterProfiles listed as dependencies are deployed. - items: - type: string - type: array - extraAnnotations: - additionalProperties: - type: string - description: |- - ExtraAnnotations: These annotations will be added by Sveltos to all Kubernetes resources - deployed in a managed cluster based on this ClusterProfile/Profile instance. - **Important:** If a resource deployed by Sveltos already has a annotation with a key present in - `ExtraAnnotations`, the value from `ExtraAnnotations` will override the existing value. - type: object - extraLabels: - additionalProperties: - type: string - description: |- - ExtraLabels: These labels will be added by Sveltos to all Kubernetes resources deployed in - a managed cluster based on this ClusterProfile/Profile instance. - **Important:** If a resource deployed by Sveltos already has a label with a key present in - `ExtraLabels`, the value from `ExtraLabels` will override the existing value. - type: object - helmCharts: - description: Helm charts is a list of helm charts that need to be deployed - items: - properties: - chartName: - description: ChartName is the chart name - minLength: 1 - type: string - chartVersion: - description: ChartVersion is the chart version - minLength: 1 - type: string - helmChartAction: - default: Install - description: HelmChartAction is the action that will be taken on the helm chart - enum: - - Install - - Uninstall - type: string - options: - description: Options allows to set flags which are used during installation. - properties: - atomic: - default: false - description: |- - if set, the installation process deletes the installation/upgrades on failure. - The --wait flag will be set automatically if --atomic is used - Default to false - type: boolean - dependencyUpdate: - default: false - description: |- - update dependencies if they are missing before installing the chart - Default to false - type: boolean - description: - description: Description is the description of an helm operation - type: string - disableHooks: - default: false - description: |- - prevent hooks from running during install/upgrade/uninstall - Default to false - type: boolean - disableOpenAPIValidation: - default: false - description: |- - if set, the installation process will not validate rendered templates against the Kubernetes OpenAPI Schema - Default to false - type: boolean - enableClientCache: - default: false - description: EnableClientCache is a flag to enable Helm client cache. If it is not specified, it will be set to false. - type: boolean - installOptions: - description: HelmInstallOptions are options specific to helm install - properties: - createNamespace: - default: true - description: Create the release namespace if not present. Defaults to true - type: boolean - replace: - default: true - description: Replaces if set indicates to replace an older release with this one - type: boolean - type: object - labels: - additionalProperties: - type: string - description: Labels that would be added to release metadata. - type: object - skipCRDs: - default: false - description: |- - SkipCRDs controls whether CRDs should be installed during install/upgrade operation. - By default, CRDs are installed if not already present. - type: boolean - skipSchemaValidation: - default: false - description: SkipSchemaValidation determines if JSON schema validation is disabled. - type: boolean - timeout: - description: time to wait for any individual Kubernetes operation (like Jobs for hooks) (default 5m0s) - type: string - uninstallOptions: - description: HelmUninstallOptions are options specific to helm uninstall - properties: - deletionPropagation: - description: DeletionPropagation - enum: - - orphan - - foreground - - background - type: string - keepHistory: - description: |- - When uninstall a chart with this flag, Helm removes the resources associated with the chart, - but it keeps the release information. This allows to see details about the uninstalled release - using the helm history command. - type: boolean - type: object - upgradeOptions: - description: HelmUpgradeOptions are options specific to helm upgrade - properties: - cleanupOnFail: - default: false - description: CleanupOnFail will, if true, cause the upgrade to delete newly-created resources on a failed update. - type: boolean - force: - default: false - description: |- - Force will, if set to `true`, ignore certain warnings and perform the upgrade anyway. - This should be used with caution. - type: boolean - maxHistory: - default: 2 - description: |- - MaxHistory limits the maximum number of revisions saved per release - Default to 2 - type: integer - recreate: - default: false - description: Recreate will (if true) recreate pods after a rollback. - type: boolean - resetThenReuseValues: - default: false - description: ResetThenReuseValues will reset the values to the chart's built-ins then merge with user's last supplied values. - type: boolean - resetValues: - default: false - description: ResetValues will reset the values to the chart's built-ins rather than merging with existing. - type: boolean - reuseValues: - default: false - description: |- - ReuseValues copies values from the current release to a new release if the - new release does not have any values. If the request already has values, - or if there are no values in the current release, this does nothing. - This is skipped if the ResetValues flag is set, in which case the - request values are not altered. - type: boolean - subNotes: - default: false - description: SubNotes determines whether sub-notes are rendered in the chart. - type: boolean - upgradeCRDs: - default: false - description: |- - UpgradeCRDs upgrade CRDs from the Helm Chart's crds directory - By default, CRDs are not applied during Helm upgrade action by Helm - https://helm.sh/docs/chart_best_practices/custom_resource_definitions/ - type: boolean - type: object - wait: - default: false - description: |- - if set, will wait until all Pods, PVCs, Services, and minimum number of Pods of a Deployment, StatefulSet, or ReplicaSet - are in a ready state before marking the release as successful. It will wait for as long as --timeout - Default to false - type: boolean - waitForJobs: - default: false - description: |- - if set and --wait enabled, will wait until all Jobs have been completed before marking the release as successful. - It will wait for as long as --timeout - Default to false - type: boolean - type: object - releaseName: - description: ReleaseName is the chart release - minLength: 1 - type: string - releaseNamespace: - description: ReleaseNamespace is the namespace release will be installed - minLength: 1 - type: string - repositoryName: - description: RepositoryName is the name helm chart repository - minLength: 1 - type: string - repositoryURL: - description: RepositoryURL is the URL helm chart repository - minLength: 1 - type: string - values: - description: |- - Values field allows to define configuration for the Helm release. - These values can be static or leverage Go templates for dynamic customization. - When expressed as templates, the values are filled in using information from - resources within the management cluster before deployment. - type: string - valuesFrom: - description: |- - ValuesFrom can reference ConfigMap/Secret instances. Within the ConfigMap or Secret data, - it is possible to store configuration for the Helm release. - These values can be static or leverage Go templates for dynamic customization. - When expressed as templates, the values are filled in using information from - resources within the management cluster before deployment. - items: - properties: - kind: - description: |- - Kind of the resource. Supported kinds are: - - ConfigMap/Secret - enum: - - ConfigMap - - Secret - type: string - name: - description: Name of the referenced resource. - minLength: 1 - type: string - namespace: - description: |- - Namespace of the referenced resource. - For ClusterProfile namespace can be left empty. In such a case, namespace will - be implicit set to cluster's namespace. - For Profile namespace must be left empty. The Profile namespace will be used. - type: string - required: - - kind - - name - - namespace - type: object - type: array - required: - - chartName - - chartVersion - - releaseName - - releaseNamespace - - repositoryName - - repositoryURL - type: object - type: array - kustomizationRefs: - description: |- - Kustomization refs is a list of kustomization paths. Kustomization will - be run on those paths and the outcome will be deployed. - items: - properties: - deploymentType: - default: Remote - description: |- - DeploymentType indicates whether resources need to be deployed - into the management cluster (local) or the managed cluster (remote) - enum: - - Local - - Remote - type: string - kind: - description: |- - Kind of the resource. Supported kinds are: - - flux GitRepository;OCIRepository;Bucket - - ConfigMap/Secret - enum: - - GitRepository - - OCIRepository - - Bucket - - ConfigMap - - Secret - type: string - name: - description: Name of the referenced resource. - minLength: 1 - type: string - namespace: - description: |- - Namespace of the referenced resource. - For ClusterProfile namespace can be left empty. In such a case, namespace will - be implicit set to cluster's namespace. - For Profile namespace must be left empty. The Profile namespace will be used. - type: string - path: - description: |- - Path to the directory containing the kustomization.yaml file, or the - set of plain YAMLs a kustomization.yaml should be generated for. - Defaults to 'None', which translates to the root path of the SourceRef. - type: string - targetNamespace: - description: |- - TargetNamespace sets or overrides the namespace in the - kustomization.yaml file. - maxLength: 63 - minLength: 1 - type: string - values: - additionalProperties: - type: string - description: |- - Values is a map[string]string type that allows to define a set of key-value pairs. - These key-value pairs can optionally leverage Go templates for further processing. - With Sveltos, you can define key-value pairs where the values can be Go templates. - These templates have access to management cluster information during deployment. This allows - to do more than just replace placeholders. Variables can be used to dynamically - construct values based on other resources or variables within the Kustomize output. - For example, imagine you have a Region key with a template value like: - '{{ index .Cluster.metadata.labels "region" }}'. - This template retrieves the region label from the cluster instance metadata. - Finally, Sveltos uses these processed values to fill placeholders in the Kustomize output. - The output itself can also contain templates, like: - region: '{{ default "west" .Region }}'. - This way, the final output from Kustomize will have the region set dynamically based on - the actual region retrieved earlier. - type: object - valuesFrom: - description: |- - ValuesFrom can reference ConfigMap/Secret instances. Within the ConfigMap or Secret data, - it is possible to define key-value pairs. These key-value pairs can optionally leverage - Go templates for further processing. - With Sveltos, you can define key-value pairs where the values can be Go templates. - These templates have access to management cluster information during deployment. This allows - to do more than just replace placeholders. Variables can be used to dynamically - construct values based on other resources or variables within the Kustomize output. - For example, imagine you have a Region key with a template value like: - '{{ index .Cluster.metadata.labels "region" }}'. - This template retrieves the region label from the cluster instance metadata. - Finally, Sveltos uses these processed values to fill placeholders in the Kustomize output. - The output itself can also contain templates, like: - region: '{{ default "west" .Region }}'. - This way, the final output from Kustomize will have the region set dynamically based on - the actual region retrieved earlier. - items: - properties: - kind: - description: |- - Kind of the resource. Supported kinds are: - - ConfigMap/Secret - enum: - - ConfigMap - - Secret - type: string - name: - description: Name of the referenced resource. - minLength: 1 - type: string - namespace: - description: |- - Namespace of the referenced resource. - For ClusterProfile namespace can be left empty. In such a case, namespace will - be implicit set to cluster's namespace. - For Profile namespace must be left empty. The Profile namespace will be used. - type: string - required: - - kind - - name - - namespace - type: object - type: array - required: - - kind - - name - - namespace - type: object - type: array - maxUpdate: - anyOf: - - type: integer - - type: string - description: |- - The maximum number of clusters that can be updated concurrently. - Value can be an absolute number (ex: 5) or a percentage of desired cluster (ex: 10%). - Defaults to 100%. - Example: when this is set to 30%, when list of add-ons/applications in ClusterProfile - changes, only 30% of matching clusters will be updated in parallel. Only when updates - in those cluster succeed, other matching clusters are updated. - pattern: ^((100|[0-9]{1,2})%|[0-9]+)$ - x-kubernetes-int-or-string: true - policyRefs: - description: |- - PolicyRefs references all the ConfigMaps/Secrets containing kubernetes resources - that need to be deployed in the matching CAPI clusters. - items: - properties: - deploymentType: - default: Remote - description: |- - DeploymentType indicates whether resources need to be deployed - into the management cluster (local) or the managed cluster (remote) - enum: - - Local - - Remote - type: string - kind: - description: |- - Kind of the resource. Supported kinds are: - - ConfigMap/Secret - - flux GitRepository;OCIRepository;Bucket - enum: - - GitRepository - - OCIRepository - - Bucket - - ConfigMap - - Secret - type: string - name: - description: Name of the referenced resource. - minLength: 1 - type: string - namespace: - description: |- - Namespace of the referenced resource. - For ClusterProfile namespace can be left empty. In such a case, namespace will - be implicit set to cluster's namespace. - For Profile namespace must be left empty. Profile namespace will be used. - type: string - path: - description: |- - Path to the directory containing the YAML files. - Defaults to 'None', which translates to the root path of the SourceRef. - Used only for GitRepository;OCIRepository;Bucket - type: string - required: - - kind - - name - type: object - type: array - reloader: - default: false - description: |- - Reloader indicates whether Deployment/StatefulSet/DaemonSet instances deployed - by Sveltos and part of this ClusterProfile need to be restarted via rolling upgrade - when a ConfigMap/Secret instance mounted as volume is modified. - When set to true, when any mounted ConfigMap/Secret is modified, Sveltos automatically - starts a rolling upgrade for Deployment/StatefulSet/DaemonSet instances mounting it. - type: boolean - setRefs: - description: |- - SetRefs identifies referenced (cluster)Sets. - - ClusterProfile can reference ClusterSet; - - Profile can reference Set; - items: - type: string - type: array - stopMatchingBehavior: - default: WithdrawPolicies - description: |- - StopMatchingBehavior indicates what behavior should be when a Cluster stop matching - the ClusterProfile. By default all deployed Helm charts and Kubernetes resources will - be withdrawn from Cluster. Setting StopMatchingBehavior to LeavePolicies will instead - leave ClusterProfile deployed policies in the Cluster. - enum: - - WithdrawPolicies - - LeavePolicies - type: string - syncMode: - default: Continuous - description: |- - SyncMode specifies how features are synced in a matching workload cluster. - - OneTime means, first time a workload cluster matches the ClusterProfile, - features will be deployed in such cluster. Any subsequent feature configuration - change won't be applied into the matching workload clusters; - - Continuous mode ensures that the first time a workload cluster matches a ClusterProfile, - the specified features are deployed. Subsequent changes to the feature configuration are also - automatically applied to all matching workload clusters. - _ SyncModeContinuousWithDriftDetection operates similarly to Continuous mode, but also monitors - matching managed clusters for configuration drift. If drift is detected, a reconciliation is - triggered to ensure the managed cluster's configuration aligns with the ClusterProfile. - - DryRun means no change will be propagated to any matching cluster. A report - instead will be generated summarizing what would happen in any matching cluster - because of the changes made to ClusterProfile while in DryRun mode. - enum: - - OneTime - - Continuous - - ContinuousWithDriftDetection - - DryRun - type: string - templateResourceRefs: - description: |- - TemplateResourceRefs is a list of resource to collect from the management cluster. - Those resources' values will be used to instantiate templates contained in referenced - PolicyRefs and Helm charts - items: - properties: - identifier: - description: |- - Identifier is how the resource will be referred to in the - template - type: string - resource: - description: |- - Resource references a Kubernetes instance in the management - cluster to fetch and use during template instantiation. - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: |- - If referring to a piece of an object instead of an entire object, this string - should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within a pod, this would take on a value like: - "spec.containers{name}" (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" (container with - index 2 in this pod). This syntax is chosen only to have some well-defined way of - referencing a part of an object. - type: string - kind: - description: |- - Kind of the referent. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - name: - description: |- - Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - namespace: - description: |- - Namespace of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - type: string - resourceVersion: - description: |- - Specific resourceVersion to which this reference is made, if any. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency - type: string - uid: - description: |- - UID of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - type: string - type: object - x-kubernetes-map-type: atomic - required: - - identifier - - resource - type: object - type: array - x-kubernetes-list-map-keys: - - identifier - x-kubernetes-list-type: map - tier: - default: 100 - description: |- - Tier controls the order of deployment for ClusterProfile or Profile resources targeting - the same cluster resources. - Imagine two configurations (ClusterProfiles or Profiles) trying to deploy the same resource (a Kubernetes - resource or an helm chart). By default, the first one to reach the cluster "wins" and deploys it. - Tier allows you to override this. When conflicts arise, the ClusterProfile or Profile with the **lowest** - Tier value takes priority and deploys the resource. - Higher Tier values represent lower priority. The default Tier value is 100. - Using Tiers provides finer control over resource deployment within your cluster, particularly useful - when multiple configurations manage the same resources. - format: int32 - minimum: 1 - type: integer - validateHealths: - description: |- - ValidateHealths is a slice of Lua functions to run against - the managed cluster to validate the state of those add-ons/applications - is healthy - items: - properties: - featureID: - description: |- - FeatureID is an indentifier of the feature (Helm/Kustomize/Resources) - This field indicates when to run this check. - For instance: - - if set to Helm this check will be run after all helm - charts specified in the ClusterProfile are deployed. - - if set to Resources this check will be run after the content - of all the ConfigMaps/Secrets referenced by ClusterProfile in the - PolicyRef sections is deployed - enum: - - Resources - - Helm - - Kustomize - type: string - group: - description: Group of the resource to fetch in the managed Cluster. - type: string - kind: - description: Kind of the resource to fetch in the managed Cluster. - minLength: 1 - type: string - labelFilters: - description: LabelFilters allows to filter resources based on current labels. - items: - properties: - key: - description: Key is the label key - type: string - operation: - description: Operation is the comparison operation - enum: - - Equal - - Different - type: string - value: - description: Value is the label value - type: string - required: - - key - - operation - - value - type: object - type: array - name: - description: Name is the name of this check - type: string - namespace: - description: |- - Namespace of the resource to fetch in the managed Cluster. - Empty for resources scoped at cluster level. - type: string - script: - description: |- - Script is a text containing a lua script. - Must return struct with field "health" - representing whether object is a match (true or false) - type: string - version: - description: Version of the resource to fetch in the managed Cluster. - type: string - required: - - featureID - - group - - kind - - name - - version - type: object - type: array - type: object - status: - description: Status defines the observed state of ClusterProfile/Profile - properties: - matchingClusters: - description: |- - MatchingClusterRefs reference all the clusters currently matching - ClusterProfile ClusterSelector - items: - description: ObjectReference contains enough information to let you inspect or modify the referred object. - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: |- - If referring to a piece of an object instead of an entire object, this string - should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within a pod, this would take on a value like: - "spec.containers{name}" (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" (container with - index 2 in this pod). This syntax is chosen only to have some well-defined way of - referencing a part of an object. - type: string - kind: - description: |- - Kind of the referent. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - name: - description: |- - Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - namespace: - description: |- - Namespace of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - type: string - resourceVersion: - description: |- - Specific resourceVersion to which this reference is made, if any. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency - type: string - uid: - description: |- - UID of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - type: string - type: object - x-kubernetes-map-type: atomic - type: array - updatedClusters: - description: |- - UpdatedClusters contains information all the cluster currently matching - ClusterProfile ClusterSelector and already updated to latest ClusterProfile - Spec - properties: - clusters: - description: |- - Clusters reference all the clusters currently matching - ClusterProfile ClusterSelector and already updated/being updated - to ClusterProfile Spec - items: - description: ObjectReference contains enough information to let you inspect or modify the referred object. - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: |- - If referring to a piece of an object instead of an entire object, this string - should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within a pod, this would take on a value like: - "spec.containers{name}" (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" (container with - index 2 in this pod). This syntax is chosen only to have some well-defined way of - referencing a part of an object. - type: string - kind: - description: |- - Kind of the referent. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - name: - description: |- - Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - namespace: - description: |- - Namespace of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - type: string - resourceVersion: - description: |- - Specific resourceVersion to which this reference is made, if any. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency - type: string - uid: - description: |- - UID of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - type: string - type: object - x-kubernetes-map-type: atomic - type: array - hash: - description: |- - Hash represents of a unique value for ClusterProfile Spec at - a fixed point in time - format: byte - type: string - type: object - updatingClusters: - description: |- - UpdatingClusters reference all the cluster currently matching - ClusterProfile ClusterSelector and being updated - properties: - clusters: - description: |- - Clusters reference all the clusters currently matching - ClusterProfile ClusterSelector and already updated/being updated - to ClusterProfile Spec - items: - description: ObjectReference contains enough information to let you inspect or modify the referred object. - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: |- - If referring to a piece of an object instead of an entire object, this string - should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within a pod, this would take on a value like: - "spec.containers{name}" (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" (container with - index 2 in this pod). This syntax is chosen only to have some well-defined way of - referencing a part of an object. - type: string - kind: - description: |- - Kind of the referent. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - name: - description: |- - Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - namespace: - description: |- - Namespace of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - type: string - resourceVersion: - description: |- - Specific resourceVersion to which this reference is made, if any. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency - type: string - uid: - description: |- - UID of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - type: string - type: object - x-kubernetes-map-type: atomic - type: array - hash: - description: |- - Hash represents of a unique value for ClusterProfile Spec at - a fixed point in time - format: byte - type: string - type: object - type: object - type: object - served: true - storage: false - subresources: - status: {} - name: v1beta1 schema: openAPIV3Schema: @@ -1592,6 +670,13 @@ spec: - namespace type: object type: array + maxConsecutiveFailures: + description: |- + The maximum number of consecutive deployment failures that Sveltos will permit. + After this many consecutive failures, the deployment will be considered failed, and Sveltos will stop retrying. + This setting applies only to feature deployments, not resource removal. + This field is optional. If not set, Sveltos default behavior is to keep retrying. + type: integer maxUpdate: anyOf: - type: integer diff --git a/templates/provider/kcm/projectsveltos-crds/reloaderreports.lib.projectsveltos.io.yaml b/templates/provider/kcm/projectsveltos-crds/reloaderreports.lib.projectsveltos.io.yaml index e2f17f13a..30b0127b2 100644 --- a/templates/provider/kcm/projectsveltos-crds/reloaderreports.lib.projectsveltos.io.yaml +++ b/templates/provider/kcm/projectsveltos-crds/reloaderreports.lib.projectsveltos.io.yaml @@ -14,98 +14,6 @@ spec: singular: reloaderreport scope: Namespaced versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - description: ReloaderReport is the Schema for the ReloaderReport 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: - properties: - clusterName: - description: |- - ClusterName is the name of the Cluster this ReloaderReport - is for. - type: string - clusterNamespace: - description: |- - ClusterNamespace is the namespace of the Cluster this - ReloaderReport is for. - type: string - clusterType: - description: |- - ClusterType is the type of Cluster this ReloaderReport - is for. - type: string - resourcesToReload: - description: |- - ResourcesToReload contains a list of resources that requires - rolling upgrade - items: - description: |- - ReloaderInfo represents a resource that need to be reloaded - if any mounted ConfigMap/Secret changes. - properties: - kind: - description: 'Kind of the resource. Supported kinds are: Deployment StatefulSet DaemonSet.' - enum: - - Deployment - - StatefulSet - - DaemonSet - type: string - name: - description: Name of the referenced resource. - minLength: 1 - type: string - namespace: - description: Namespace of the referenced resource. - minLength: 1 - type: string - value: - type: string - required: - - kind - - name - - namespace - type: object - type: array - required: - - clusterName - - clusterNamespace - - clusterType - type: object - status: - description: ReloaderReportStatus defines the observed state of ReloaderReport - properties: - phase: - description: Phase represents the current phase of report. - enum: - - WaitingForDelivery - - Delivering - - Processed - type: string - type: object - type: object - served: true - storage: false - subresources: - status: {} - name: v1beta1 schema: openAPIV3Schema: diff --git a/templates/provider/kcm/projectsveltos-crds/reloaders.lib.projectsveltos.io.yaml b/templates/provider/kcm/projectsveltos-crds/reloaders.lib.projectsveltos.io.yaml index 58eeec65c..0819041e6 100644 --- a/templates/provider/kcm/projectsveltos-crds/reloaders.lib.projectsveltos.io.yaml +++ b/templates/provider/kcm/projectsveltos-crds/reloaders.lib.projectsveltos.io.yaml @@ -14,64 +14,6 @@ spec: singular: reloader scope: Cluster versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - description: Reloader is the Schema for the Reloader 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: ReloaderSpec defines the desired state of Reloader - properties: - reloaderInfo: - items: - description: |- - ReloaderInfo represents a resource that need to be reloaded - if any mounted ConfigMap/Secret changes. - properties: - kind: - description: 'Kind of the resource. Supported kinds are: Deployment StatefulSet DaemonSet.' - enum: - - Deployment - - StatefulSet - - DaemonSet - type: string - name: - description: Name of the referenced resource. - minLength: 1 - type: string - namespace: - description: Namespace of the referenced resource. - minLength: 1 - type: string - value: - type: string - required: - - kind - - name - - namespace - type: object - type: array - type: object - type: object - served: true - storage: false - name: v1beta1 schema: openAPIV3Schema: diff --git a/templates/provider/kcm/projectsveltos-crds/rolerequests.lib.projectsveltos.io.yaml b/templates/provider/kcm/projectsveltos-crds/rolerequests.lib.projectsveltos.io.yaml index 983eef524..6cc10537b 100644 --- a/templates/provider/kcm/projectsveltos-crds/rolerequests.lib.projectsveltos.io.yaml +++ b/templates/provider/kcm/projectsveltos-crds/rolerequests.lib.projectsveltos.io.yaml @@ -3,20 +3,9 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - cert-manager.io/inject-ca-from: projectsveltos/projectsveltos-serving-cert controller-gen.kubebuilder.io/version: v0.17.2 name: rolerequests.lib.projectsveltos.io spec: - conversion: - strategy: Webhook - webhook: - clientConfig: - service: - name: webhook-service - namespace: projectsveltos - path: /convert - conversionReviewVersions: - - v1 group: lib.projectsveltos.io names: kind: RoleRequest @@ -25,220 +14,6 @@ spec: singular: rolerequest scope: Cluster versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - description: RoleRequest is the Schema for the rolerequest 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: RoleRequestSpec defines the desired state of RoleRequest - properties: - clusterSelector: - description: |- - ClusterSelector identifies clusters where permissions requestes - in this instance will be granted (Deprecated use selector instead) - type: string - expirationSeconds: - description: |- - ExpirationSeconds is the requested duration of validity of the TokenRequest - associated to ServiceAccount. If not specified, default value is used - format: int64 - type: integer - roleRefs: - description: |- - RoleRefs references all the Secret/ConfigMaps containing kubernetes - Roles/ClusterRoles that need to be deployed in the matching clusters. - items: - description: |- - PolicyRef specifies a resource containing one or more policy - to deploy in matching Clusters. - properties: - kind: - description: 'Kind of the resource. Supported kinds are: Secrets and ConfigMaps.' - enum: - - Secret - - ConfigMap - type: string - name: - description: Name of the referenced resource. - minLength: 1 - type: string - namespace: - description: |- - Namespace of the referenced resource. - Namespace can be left empty. In such a case, namespace will - be implicit set to cluster's namespace. - type: string - required: - - kind - - name - - namespace - type: object - type: array - serviceAccountName: - description: |- - ServiceAccountName is the name of the ServiceAccount representing a tenant admin for which - those permissions are requested - type: string - serviceAccountNamespace: - description: |- - ServiceAccountNamespace is the name of the ServiceAccount representing a tenant admin - for which those permissions are requested - type: string - required: - - clusterSelector - - serviceAccountName - - serviceAccountNamespace - type: object - status: - description: RoleRequestStatus defines the status of RoleRequest - properties: - clusterInfo: - description: |- - ClusterInfo represents the hash of the ClusterRoles/Roles deployed in - a matching cluster for the admin. - items: - properties: - cluster: - description: Cluster references the Cluster - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: |- - If referring to a piece of an object instead of an entire object, this string - should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within a pod, this would take on a value like: - "spec.containers{name}" (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" (container with - index 2 in this pod). This syntax is chosen only to have some well-defined way of - referencing a part of an object. - type: string - kind: - description: |- - Kind of the referent. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - name: - description: |- - Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - namespace: - description: |- - Namespace of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - type: string - resourceVersion: - description: |- - Specific resourceVersion to which this reference is made, if any. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency - type: string - uid: - description: |- - UID of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - type: string - type: object - x-kubernetes-map-type: atomic - failureMessage: - description: FailureMessage provides more information about the error. - type: string - hash: - description: |- - Hash represents the hash of the Classifier currently deployed - in the Cluster - format: byte - type: string - status: - description: Status represents the state of the feature in the workload cluster - enum: - - Provisioning - - Provisioned - - Failed - - Removing - - Removed - type: string - required: - - cluster - - hash - type: object - type: array - failureMessage: - description: FailureMessage provides more information if an error occurs. - type: string - matchingClusters: - description: |- - MatchingClusterRefs reference all the cluster currently matching - RoleRequest ClusterSelector - items: - description: ObjectReference contains enough information to let you inspect or modify the referred object. - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: |- - If referring to a piece of an object instead of an entire object, this string - should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within a pod, this would take on a value like: - "spec.containers{name}" (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" (container with - index 2 in this pod). This syntax is chosen only to have some well-defined way of - referencing a part of an object. - type: string - kind: - description: |- - Kind of the referent. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - name: - description: |- - Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - namespace: - description: |- - Namespace of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - type: string - resourceVersion: - description: |- - Specific resourceVersion to which this reference is made, if any. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency - type: string - uid: - description: |- - UID of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - type: string - type: object - x-kubernetes-map-type: atomic - type: array - type: object - type: object - served: true - storage: false - subresources: - status: {} - name: v1beta1 schema: openAPIV3Schema: diff --git a/templates/provider/kcm/projectsveltos-crds/sets.lib.projectsveltos.io.yaml b/templates/provider/kcm/projectsveltos-crds/sets.lib.projectsveltos.io.yaml index bc7ea47bc..e37831126 100644 --- a/templates/provider/kcm/projectsveltos-crds/sets.lib.projectsveltos.io.yaml +++ b/templates/provider/kcm/projectsveltos-crds/sets.lib.projectsveltos.io.yaml @@ -3,20 +3,9 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - cert-manager.io/inject-ca-from: projectsveltos/projectsveltos-serving-cert controller-gen.kubebuilder.io/version: v0.17.2 name: sets.lib.projectsveltos.io spec: - conversion: - strategy: Webhook - webhook: - clientConfig: - service: - name: webhook-service - namespace: projectsveltos - path: /convert - conversionReviewVersions: - - v1 group: lib.projectsveltos.io names: kind: Set @@ -25,190 +14,6 @@ spec: singular: set scope: Namespaced versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - description: Set is the Schema for the sets 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: - properties: - clusterRefs: - description: ClusterRefs identifies clusters to associate to. - items: - description: ObjectReference contains enough information to let you inspect or modify the referred object. - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: |- - If referring to a piece of an object instead of an entire object, this string - should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within a pod, this would take on a value like: - "spec.containers{name}" (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" (container with - index 2 in this pod). This syntax is chosen only to have some well-defined way of - referencing a part of an object. - type: string - kind: - description: |- - Kind of the referent. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - name: - description: |- - Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - namespace: - description: |- - Namespace of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - type: string - resourceVersion: - description: |- - Specific resourceVersion to which this reference is made, if any. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency - type: string - uid: - description: |- - UID of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - type: string - type: object - x-kubernetes-map-type: atomic - type: array - clusterSelector: - description: ClusterSelector identifies clusters to associate to (Deprecated use selector instead). - type: string - maxReplicas: - description: |- - MaxReplicas specifies the maximum number of clusters to be selected - from the pool matching the clusterSelector. - type: integer - type: object - status: - description: Status defines the observed state of ClusterSet/Set - properties: - matchingClusterRefs: - description: |- - MatchingClusterRefs reference all the clusters currently matching - ClusterSet/Set ClusterSelector - items: - description: ObjectReference contains enough information to let you inspect or modify the referred object. - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: |- - If referring to a piece of an object instead of an entire object, this string - should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within a pod, this would take on a value like: - "spec.containers{name}" (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" (container with - index 2 in this pod). This syntax is chosen only to have some well-defined way of - referencing a part of an object. - type: string - kind: - description: |- - Kind of the referent. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - name: - description: |- - Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - namespace: - description: |- - Namespace of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - type: string - resourceVersion: - description: |- - Specific resourceVersion to which this reference is made, if any. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency - type: string - uid: - description: |- - UID of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - type: string - type: object - x-kubernetes-map-type: atomic - type: array - selectedClusterRefs: - description: |- - SelectedClusters reference all the cluster currently selected among - all the ones matching - items: - description: ObjectReference contains enough information to let you inspect or modify the referred object. - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: |- - If referring to a piece of an object instead of an entire object, this string - should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within a pod, this would take on a value like: - "spec.containers{name}" (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" (container with - index 2 in this pod). This syntax is chosen only to have some well-defined way of - referencing a part of an object. - type: string - kind: - description: |- - Kind of the referent. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - name: - description: |- - Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - namespace: - description: |- - Namespace of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - type: string - resourceVersion: - description: |- - Specific resourceVersion to which this reference is made, if any. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency - type: string - uid: - description: |- - UID of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - type: string - type: object - x-kubernetes-map-type: atomic - type: array - type: object - type: object - served: true - storage: false - subresources: - status: {} - name: v1beta1 schema: openAPIV3Schema: diff --git a/templates/provider/kcm/projectsveltos-crds/sveltosclusters.lib.projectsveltos.io.yaml b/templates/provider/kcm/projectsveltos-crds/sveltosclusters.lib.projectsveltos.io.yaml index 893f81489..dab3aef39 100644 --- a/templates/provider/kcm/projectsveltos-crds/sveltosclusters.lib.projectsveltos.io.yaml +++ b/templates/provider/kcm/projectsveltos-crds/sveltosclusters.lib.projectsveltos.io.yaml @@ -14,159 +14,6 @@ spec: singular: sveltoscluster scope: Namespaced versions: - - additionalPrinterColumns: - - description: Indicates whether cluster is ready to be managed by sveltos - jsonPath: .status.ready - name: Ready - type: boolean - - description: Kubernetes version associated with this Cluster - jsonPath: .status.version - name: Version - type: string - name: v1alpha1 - schema: - openAPIV3Schema: - description: SveltosCluster is the Schema for the SveltosCluster 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: SveltosClusterSpec defines the desired state of SveltosCluster - properties: - activeWindow: - description: |- - ActiveWindow is an optional field for automatically pausing and unpausing - the cluster. - If not specified, the cluster will not be paused or unpaused automatically. - properties: - from: - description: |- - From in Cron format, see https://en.wikipedia.org/wiki/Cron. - Indicates when to un-pause the cluster (cluster in paused state receives no update from sveltos). - minLength: 1 - type: string - to: - description: |- - To in Cron format, see https://en.wikipedia.org/Cron. - Indicates when to pause the cluster (cluster in paused state receives no update from sveltos). - minLength: 1 - type: string - required: - - from - - to - type: object - consecutiveFailureThreshold: - default: 3 - description: |- - ConsecutiveFailureThreshold is the maximum number of consecutive connection - failures before setting the problem status in Status.ConnectionStatus - type: integer - data: - additionalProperties: - type: string - description: ArbitraryData allows for arbitrary nested structures - type: object - kubeconfigKeyName: - description: |- - KubeconfigKeyName specifies the key within the Secret that holds the kubeconfig. - If not specified, Sveltos will use first key in the Secret. - type: string - kubeconfigName: - description: |- - KubeconfigName allows overriding the default Sveltos convention which expected a valid kubeconfig - to be hosted in a secret with the pattern ${sveltosClusterName}-sveltos-kubeconfig. - - When a value is specified, the referenced Kubernetes Secret object must exist, - and will be used to connect to the Kubernetes cluster. - type: string - paused: - description: |- - Paused can be used to prevent controllers from processing the - SveltosCluster and all its associated objects. - type: boolean - tokenRequestRenewalOption: - description: TokenRequestRenewalOption contains options describing how to renew TokenRequest - properties: - renewTokenRequestInterval: - description: RenewTokenRequestInterval is the interval at which to renew the TokenRequest - type: string - saName: - description: |- - SAName is name of the ServiceAccount to renew the token for. - If specified, ServiceAccount must exist in the managed cluster. - If not specified, sveltos will try to deduce it from current kubeconfig - type: string - saNamespace: - description: |- - SANamespace is the namespace of the ServiceAccount to renew the token for. - If specified, ServiceAccount must exist in the managed cluster. - If not specified, sveltos will try to deduce it from current kubeconfig - type: string - required: - - renewTokenRequestInterval - type: object - type: object - status: - description: SveltosClusterStatus defines the status of SveltosCluster - properties: - connectionFailures: - description: |- - connectionFailures is the number of consecutive failed attempts to connect - to the remote cluster. - type: integer - connectionStatus: - description: |- - ConnectionStatus indicates whether connection from the management cluster - to the managed cluster is healthy - enum: - - Healthy - - Down - type: string - failureMessage: - description: |- - FailureMessage is a human consumable message explaining the - misconfiguration - type: string - lastReconciledTokenRequestAt: - description: |- - LastReconciledTokenRequestAt is the last time the TokenRequest - was renewed. - type: string - nextPause: - description: Information when next pause cluster is scheduled - format: date-time - type: string - nextUnpause: - description: Information when next unpause cluster is scheduled - format: date-time - type: string - ready: - description: Ready is the state of the cluster. - type: boolean - version: - description: The Kubernetes version of the cluster. - type: string - type: object - type: object - served: true - storage: false - subresources: - status: {} - additionalPrinterColumns: - description: Indicates whether cluster is ready to be managed by sveltos jsonPath: .status.ready @@ -247,11 +94,183 @@ spec: When a value is specified, the referenced Kubernetes Secret object must exist, and will be used to connect to the Kubernetes cluster. type: string + livenessChecks: + description: |- + LivenessChecks is an optional list of custom checks to verify cluster + is healthy + items: + properties: + condition: + description: |- + This field is used to specify a Lua function that will be used to evaluate + this check. + The function will receive the array of resources selected by ResourceSelectors. + The Lua function name is evaluate and must return a struct with: + - "result" field: boolean indicating whether check passed or failed; + - "message" field: (optional) message. + type: string + name: + description: |- + Name of the cluster check. + Must be a DNS_LABEL and unique within the ClusterChecks. + type: string + resourceSelectors: + description: ResourceSelectors identifies what Kubernetes resources to select + items: + description: ResourceSelector defines what resources are a match + properties: + evaluate: + description: |- + Evaluate contains a function "evaluate" in lua language. + The function will be passed one of the object selected based on + above criteria. + Must return struct with field "matching" representing whether + object is a match and an optional "message" field. + type: string + group: + description: Group of the resource deployed in the Cluster. + type: string + kind: + description: Kind of the resource deployed in the Cluster. + minLength: 1 + type: string + labelFilters: + description: LabelFilters allows to filter resources based on current labels. + items: + properties: + key: + description: Key is the label key + type: string + operation: + description: Operation is the comparison operation + enum: + - Equal + - Different + type: string + value: + description: Value is the label value + type: string + required: + - key + - operation + - value + type: object + type: array + name: + description: Name of the resource deployed in the Cluster. + type: string + namespace: + description: |- + Namespace of the resource deployed in the Cluster. + Empty for resources scoped at cluster level. + For namespaced resources, an empty string "" indicates all namespaces. + type: string + version: + description: Version of the resource deployed in the Cluster. + type: string + required: + - group + - kind + - version + type: object + type: array + required: + - condition + - name + - resourceSelectors + type: object + type: array paused: description: |- Paused can be used to prevent controllers from processing the SveltosCluster and all its associated objects. type: boolean + readinessChecks: + description: |- + ReadinessChecks is an optional list of custom checks to verify cluster + readiness + items: + properties: + condition: + description: |- + This field is used to specify a Lua function that will be used to evaluate + this check. + The function will receive the array of resources selected by ResourceSelectors. + The Lua function name is evaluate and must return a struct with: + - "result" field: boolean indicating whether check passed or failed; + - "message" field: (optional) message. + type: string + name: + description: |- + Name of the cluster check. + Must be a DNS_LABEL and unique within the ClusterChecks. + type: string + resourceSelectors: + description: ResourceSelectors identifies what Kubernetes resources to select + items: + description: ResourceSelector defines what resources are a match + properties: + evaluate: + description: |- + Evaluate contains a function "evaluate" in lua language. + The function will be passed one of the object selected based on + above criteria. + Must return struct with field "matching" representing whether + object is a match and an optional "message" field. + type: string + group: + description: Group of the resource deployed in the Cluster. + type: string + kind: + description: Kind of the resource deployed in the Cluster. + minLength: 1 + type: string + labelFilters: + description: LabelFilters allows to filter resources based on current labels. + items: + properties: + key: + description: Key is the label key + type: string + operation: + description: Operation is the comparison operation + enum: + - Equal + - Different + type: string + value: + description: Value is the label value + type: string + required: + - key + - operation + - value + type: object + type: array + name: + description: Name of the resource deployed in the Cluster. + type: string + namespace: + description: |- + Namespace of the resource deployed in the Cluster. + Empty for resources scoped at cluster level. + For namespaced resources, an empty string "" indicates all namespaces. + type: string + version: + description: Version of the resource deployed in the Cluster. + type: string + required: + - group + - kind + - version + type: object + type: array + required: + - condition + - name + - resourceSelectors + type: object + type: array tokenRequestRenewalOption: description: TokenRequestRenewalOption contains options describing how to renew TokenRequest properties: @@ -278,6 +297,7 @@ spec: description: SveltosClusterStatus defines the status of SveltosCluster properties: connectionFailures: + default: 0 description: |- connectionFailures is the number of consecutive failed attempts to connect to the remote cluster. diff --git a/templates/provider/projectsveltos/Chart.lock b/templates/provider/projectsveltos/Chart.lock index b85832ad7..b2de3e262 100644 --- a/templates/provider/projectsveltos/Chart.lock +++ b/templates/provider/projectsveltos/Chart.lock @@ -1,6 +1,6 @@ dependencies: - name: projectsveltos repository: https://projectsveltos.github.io/helm-charts - version: 0.47.0 -digest: sha256:5cecacf97db87408bd0b08b45af492776d3fdef41767e0f35ca483b442fffe4c -generated: "2025-02-11T17:09:17.27486+07:00" + version: 0.49.0 +digest: sha256:4e6e2f5da33e4de2022d4af44d34df58403fad29a68aea16b30eb71a8a86839b +generated: "2025-03-03T08:55:42.461985+07:00" diff --git a/templates/provider/projectsveltos/Chart.yaml b/templates/provider/projectsveltos/Chart.yaml index 41acd4e26..b529584ed 100644 --- a/templates/provider/projectsveltos/Chart.yaml +++ b/templates/provider/projectsveltos/Chart.yaml @@ -2,9 +2,9 @@ apiVersion: v2 name: projectsveltos description: A Helm chart to refer the official projectsveltos helm chart type: application -version: 0.47.0 -appVersion: "0.47.0" +version: 0.49.0 +appVersion: "0.49.0" dependencies: - name: projectsveltos - version: 0.47.0 + version: 0.49.0 repository: https://projectsveltos.github.io/helm-charts