From 15716e8fcdee2efa6895d784a2b88ea2fc91b2e7 Mon Sep 17 00:00:00 2001 From: Gergely Brautigam <182850+Skarlso@users.noreply.github.com> Date: Tue, 30 Apr 2024 12:28:29 +0200 Subject: [PATCH] fix: update golangci --- .golangci.yaml | 17 +- Dockerfile | 2 +- Makefile | 4 +- api/v1alpha1/zz_generated.deepcopy.go | 1 - ....software_productdeploymentgenerators.yaml | 91 +++++---- ...m.software_productdeploymentpipelines.yaml | 183 +++++++++-------- .../mpas.ocm.software_productdeployments.yaml | 190 ++++++++++-------- ...mpas.ocm.software_productdescriptions.yaml | 133 ++++++------ .../crd/bases/mpas.ocm.software_targets.yaml | 122 +++++------ .../bases/mpas.ocm.software_validations.yaml | 84 ++++---- config/rbac/role.yaml | 1 - controllers/productdeployment_controller.go | 7 +- .../productdeploymentgenerator_controller.go | 6 +- go.mod | 2 +- 14 files changed, 443 insertions(+), 400 deletions(-) diff --git a/.golangci.yaml b/.golangci.yaml index c059e72..db0b0b6 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -1,21 +1,17 @@ run: - go: "1.21" + go: "1.22" timeout: 10m tests: false allow-parallel-runners: true - skip-dirs: - - "./*/mock" - skip-files: - - "pkg/ocm/fakes/ocm.go" linters-settings: funlen: lines: 150 statements: 70 staticcheck: - go: "1.21" + go: "1.22" stylecheck: - go: "1.21" + go: "1.22" cyclop: max-complexity: 20 skip-tests: true @@ -25,9 +21,6 @@ linters-settings: line-length: 150 misspell: locale: US - govet: - check-shadowing: true - nilaway: nolintlint: allow-unused: false require-explanation: true @@ -43,6 +36,10 @@ linters-settings: - ip issues: + exclude-dirs: + - "./*/mock" + exclude-files: + - pkg/ocm/fakes/ocm.go max-same-issues: 0 max-issues-per-linter: 0 exclude-rules: diff --git a/Dockerfile b/Dockerfile index 4e83a25..424eff3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Build the manager binary -FROM golang:1.21 as builder +FROM golang:1.22 as builder ARG TARGETOS ARG TARGETARCH diff --git a/Makefile b/Makefile index 8b567d9..cbd377a 100644 --- a/Makefile +++ b/Makefile @@ -141,8 +141,8 @@ GOLANGCI_LINT ?= $(LOCALBIN)/golangci-lint ## Tool Versions KUSTOMIZE_VERSION ?= v3.8.7 -CONTROLLER_TOOLS_VERSION ?= v0.11.1 -GOLANGCI_LINT_VERSION ?= v1.55.2 +CONTROLLER_TOOLS_VERSION ?= v0.14.0 +GOLANGCI_LINT_VERSION ?= v1.57.2 KUSTOMIZE_INSTALL_SCRIPT ?= "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" .PHONY: kustomize diff --git a/api/v1alpha1/zz_generated.deepcopy.go b/api/v1alpha1/zz_generated.deepcopy.go index 3785354..3e0779b 100644 --- a/api/v1alpha1/zz_generated.deepcopy.go +++ b/api/v1alpha1/zz_generated.deepcopy.go @@ -1,5 +1,4 @@ //go:build !ignore_autogenerated -// +build !ignore_autogenerated // SPDX-FileCopyrightText: 2022 SAP SE or an SAP affiliate company and Open Component Model contributors. // diff --git a/config/crd/bases/mpas.ocm.software_productdeploymentgenerators.yaml b/config/crd/bases/mpas.ocm.software_productdeploymentgenerators.yaml index c88ceb5..63b83e2 100644 --- a/config/crd/bases/mpas.ocm.software_productdeploymentgenerators.yaml +++ b/config/crd/bases/mpas.ocm.software_productdeploymentgenerators.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.11.1 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.14.0 name: productdeploymentgenerators.mpas.ocm.software spec: group: mpas.ocm.software @@ -22,14 +21,19 @@ spec: 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' + 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' + 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 @@ -38,10 +42,9 @@ spec: of ProductDeploymentGenerator. properties: interval: - description: Interval is the reconciliation interval, i.e. at what - interval shall a reconciliation happen. This is used to requeue - objects for reconciliation in case the related subscription hasn't - been finished yet. + description: |- + Interval is the reconciliation interval, i.e. at what interval shall a reconciliation happen. + This is used to requeue objects for reconciliation in case the related subscription hasn't been finished yet. type: string repositoryRef: description: LocalObjectReference contains enough information to locate @@ -54,8 +57,9 @@ spec: - name type: object serviceAccountName: - description: ServiceAccountName is used to access ocm component repositories. - No other auth option is defined. https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/#add-imagepullsecrets-to-a-service-account + description: |- + ServiceAccountName is used to access ocm component repositories. No other auth option is defined. + https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/#add-imagepullsecrets-to-a-service-account type: string subscriptionRef: description: SubscriptionRef contains the reference to the component @@ -83,42 +87,42 @@ spec: conditions: items: description: "Condition contains details for one aspect of the current - state of this API Resource. --- This struct is intended for direct - use as an array at the field path .status.conditions. For example, - \n type FooStatus struct{ // Represents the observations of a - foo's current state. // Known .status.conditions.type are: \"Available\", - \"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge - // +listType=map // +listMapKey=type Conditions []metav1.Condition - `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" - protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }" + state of this API Resource.\n---\nThis struct is intended for + direct use as an array at the field path .status.conditions. For + example,\n\n\n\ttype FooStatus struct{\n\t // Represents the + observations of a foo's current state.\n\t // Known .status.conditions.type + are: \"Available\", \"Progressing\", and \"Degraded\"\n\t // + +patchMergeKey=type\n\t // +patchStrategy=merge\n\t // +listType=map\n\t + \ // +listMapKey=type\n\t Conditions []metav1.Condition `json:\"conditions,omitempty\" + patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"`\n\n\n\t + \ // other fields\n\t}" properties: lastTransitionTime: - description: lastTransitionTime is the last time the condition - transitioned from one status to another. This should be when - the underlying condition changed. If that is not known, then - using the time when the API field changed is acceptable. + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. format: date-time type: string message: - description: message is a human readable message indicating - details about the transition. This may be an empty string. + description: |- + message is a human readable message indicating details about the transition. + This may be an empty string. maxLength: 32768 type: string observedGeneration: - description: observedGeneration represents the .metadata.generation - that the condition was set based upon. For instance, if .metadata.generation - is currently 12, but the .status.conditions[x].observedGeneration - is 9, the condition is out of date with respect to the current - state of the instance. + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. format: int64 minimum: 0 type: integer reason: - description: reason contains a programmatic identifier indicating - the reason for the condition's last transition. Producers - of specific condition types may define expected values and - meanings for this field, and whether the values are considered - a guaranteed API. The value should be a CamelCase string. + description: |- + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. This field may not be empty. maxLength: 1024 minLength: 1 @@ -132,11 +136,12 @@ spec: - Unknown type: string type: - description: type of condition in CamelCase or in foo.example.com/CamelCase. - --- Many .condition.type values are consistent across resources - like Available, but because arbitrary conditions can be useful - (see .node.status.conditions), the ability to deconflict is - important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) + description: |- + type of condition in CamelCase or in foo.example.com/CamelCase. + --- + Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be + useful (see .node.status.conditions), the ability to deconflict is important. + The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) maxLength: 316 pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ type: string diff --git a/config/crd/bases/mpas.ocm.software_productdeploymentpipelines.yaml b/config/crd/bases/mpas.ocm.software_productdeploymentpipelines.yaml index f14995d..91167d8 100644 --- a/config/crd/bases/mpas.ocm.software_productdeploymentpipelines.yaml +++ b/config/crd/bases/mpas.ocm.software_productdeploymentpipelines.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.11.1 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.14.0 name: productdeploymentpipelines.mpas.ocm.software spec: group: mpas.ocm.software @@ -22,14 +21,19 @@ spec: 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' + 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' + 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 @@ -52,7 +56,8 @@ spec: extraIdentity: additionalProperties: type: string - description: Identity describes the identity of an object. + description: |- + Identity describes the identity of an object. Only ascii characters are allowed type: object labels: @@ -61,14 +66,14 @@ spec: description: Label is a label that can be set on objects. properties: merge: - description: MergeAlgorithm optionally describes the - desired merge handling used to merge the label value - during a transfer. + description: |- + MergeAlgorithm optionally describes the desired merge handling used to + merge the label value during a transfer. properties: algorithm: - description: Algorithm optionally described the - Merge algorithm used to merge the label value - during a transfer. + description: |- + Algorithm optionally described the Merge algorithm used to + merge the label value during a transfer. type: string config: description: eConfig contains optional config for @@ -103,7 +108,8 @@ spec: items: additionalProperties: type: string - description: Identity describes the identity of an object. + description: |- + Identity describes the identity of an object. Only ascii characters are allowed type: object type: array @@ -120,8 +126,9 @@ spec: extraIdentity: additionalProperties: type: string - description: Identity describes the identity of an object. Only - ascii characters are allowed + description: |- + Identity describes the identity of an object. + Only ascii characters are allowed type: object labels: description: Labels describe a list of labels @@ -129,13 +136,14 @@ spec: description: Label is a label that can be set on objects. properties: merge: - description: MergeAlgorithm optionally describes the desired - merge handling used to merge the label value during a - transfer. + description: |- + MergeAlgorithm optionally describes the desired merge handling used to + merge the label value during a transfer. properties: algorithm: - description: Algorithm optionally described the Merge - algorithm used to merge the label value during a transfer. + description: |- + Algorithm optionally described the Merge algorithm used to + merge the label value during a transfer. type: string config: description: eConfig contains optional config for the @@ -170,8 +178,9 @@ spec: items: additionalProperties: type: string - description: Identity describes the identity of an object. Only - ascii characters are allowed + description: |- + Identity describes the identity of an object. + Only ascii characters are allowed type: object type: array version: @@ -184,8 +193,9 @@ spec: extraIdentity: additionalProperties: type: string - description: Identity describes the identity of an object. Only - ascii characters are allowed + description: |- + Identity describes the identity of an object. + Only ascii characters are allowed type: object labels: description: Labels describe a list of labels @@ -193,13 +203,14 @@ spec: description: Label is a label that can be set on objects. properties: merge: - description: MergeAlgorithm optionally describes the desired - merge handling used to merge the label value during a - transfer. + description: |- + MergeAlgorithm optionally describes the desired merge handling used to + merge the label value during a transfer. properties: algorithm: - description: Algorithm optionally described the Merge - algorithm used to merge the label value during a transfer. + description: |- + Algorithm optionally described the Merge algorithm used to + merge the label value during a transfer. type: string config: description: eConfig contains optional config for the @@ -234,8 +245,9 @@ spec: items: additionalProperties: type: string - description: Identity describes the identity of an object. Only - ascii characters are allowed + description: |- + Identity describes the identity of an object. + Only ascii characters are allowed type: object type: array version: @@ -244,8 +256,9 @@ spec: - name type: object targetRef: - description: NamespacedObjectReference contains enough information - to locate the referenced Kubernetes resource object in any namespace. + description: |- + NamespacedObjectReference contains enough information to locate the referenced Kubernetes resource object in any + namespace. properties: name: description: Name of the referent. @@ -262,34 +275,34 @@ spec: to deploy to. properties: selector: - description: A label selector is a label query over a set of resources. - The result of matchLabels and matchExpressions are ANDed. An - empty label selector matches all objects. A null label selector - matches no objects. + description: |- + A label selector is a label query over a set of resources. The result of matchLabels and + matchExpressions are ANDed. An empty label selector matches all objects. A null + label selector matches no objects. properties: matchExpressions: description: matchExpressions is a list of label selector requirements. The requirements are ANDed. items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that relates - the key and values. + description: |- + A label selector requirement is a selector that contains values, a key, and an operator that + relates the key and values. properties: key: description: key is the label key that the selector applies to. type: string operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, NotIn, - Exists and DoesNotExist. + description: |- + operator represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists and DoesNotExist. type: string values: - description: values is an array of string values. If - the operator is In or NotIn, the values array must - be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced - during a strategic merge patch. + description: |- + values is an array of string values. If the operator is In or NotIn, + the values array must be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. This array is replaced during a strategic + merge patch. items: type: string type: array @@ -301,11 +314,10 @@ spec: matchLabels: additionalProperties: type: string - description: matchLabels is a map of {key,value} pairs. A - single {key,value} in the matchLabels map is equivalent - to an element of matchExpressions, whose key field is "key", - the operator is "In", and the values array contains only - "value". The requirements are ANDed. + description: |- + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, whose key field is "key", the + operator is "In", and the values array contains only "value". The requirements are ANDed. type: object type: object x-kubernetes-map-type: atomic @@ -330,42 +342,42 @@ spec: conditions: items: description: "Condition contains details for one aspect of the current - state of this API Resource. --- This struct is intended for direct - use as an array at the field path .status.conditions. For example, - \n type FooStatus struct{ // Represents the observations of a - foo's current state. // Known .status.conditions.type are: \"Available\", - \"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge - // +listType=map // +listMapKey=type Conditions []metav1.Condition - `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" - protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }" + state of this API Resource.\n---\nThis struct is intended for + direct use as an array at the field path .status.conditions. For + example,\n\n\n\ttype FooStatus struct{\n\t // Represents the + observations of a foo's current state.\n\t // Known .status.conditions.type + are: \"Available\", \"Progressing\", and \"Degraded\"\n\t // + +patchMergeKey=type\n\t // +patchStrategy=merge\n\t // +listType=map\n\t + \ // +listMapKey=type\n\t Conditions []metav1.Condition `json:\"conditions,omitempty\" + patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"`\n\n\n\t + \ // other fields\n\t}" properties: lastTransitionTime: - description: lastTransitionTime is the last time the condition - transitioned from one status to another. This should be when - the underlying condition changed. If that is not known, then - using the time when the API field changed is acceptable. + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. format: date-time type: string message: - description: message is a human readable message indicating - details about the transition. This may be an empty string. + description: |- + message is a human readable message indicating details about the transition. + This may be an empty string. maxLength: 32768 type: string observedGeneration: - description: observedGeneration represents the .metadata.generation - that the condition was set based upon. For instance, if .metadata.generation - is currently 12, but the .status.conditions[x].observedGeneration - is 9, the condition is out of date with respect to the current - state of the instance. + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. format: int64 minimum: 0 type: integer reason: - description: reason contains a programmatic identifier indicating - the reason for the condition's last transition. Producers - of specific condition types may define expected values and - meanings for this field, and whether the values are considered - a guaranteed API. The value should be a CamelCase string. + description: |- + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. This field may not be empty. maxLength: 1024 minLength: 1 @@ -379,11 +391,12 @@ spec: - Unknown type: string type: - description: type of condition in CamelCase or in foo.example.com/CamelCase. - --- Many .condition.type values are consistent across resources - like Available, but because arbitrary conditions can be useful - (see .node.status.conditions), the ability to deconflict is - important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) + description: |- + type of condition in CamelCase or in foo.example.com/CamelCase. + --- + Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be + useful (see .node.status.conditions), the ability to deconflict is important. + The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) maxLength: 316 pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ type: string diff --git a/config/crd/bases/mpas.ocm.software_productdeployments.yaml b/config/crd/bases/mpas.ocm.software_productdeployments.yaml index bbedaea..50653b6 100644 --- a/config/crd/bases/mpas.ocm.software_productdeployments.yaml +++ b/config/crd/bases/mpas.ocm.software_productdeployments.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.11.1 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.14.0 name: productdeployments.mpas.ocm.software spec: group: mpas.ocm.software @@ -21,14 +20,19 @@ spec: description: ProductDeployment is the Schema for the productdeployments 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' + 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' + 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 @@ -74,7 +78,8 @@ spec: extraIdentity: additionalProperties: type: string - description: Identity describes the identity of an object. + description: |- + Identity describes the identity of an object. Only ascii characters are allowed type: object labels: @@ -83,14 +88,14 @@ spec: description: Label is a label that can be set on objects. properties: merge: - description: MergeAlgorithm optionally describes - the desired merge handling used to merge the - label value during a transfer. + description: |- + MergeAlgorithm optionally describes the desired merge handling used to + merge the label value during a transfer. properties: algorithm: - description: Algorithm optionally described - the Merge algorithm used to merge the label - value during a transfer. + description: |- + Algorithm optionally described the Merge algorithm used to + merge the label value during a transfer. type: string config: description: eConfig contains optional config @@ -126,8 +131,9 @@ spec: items: additionalProperties: type: string - description: Identity describes the identity of an - object. Only ascii characters are allowed + description: |- + Identity describes the identity of an object. + Only ascii characters are allowed type: object type: array version: @@ -143,7 +149,8 @@ spec: extraIdentity: additionalProperties: type: string - description: Identity describes the identity of an object. + description: |- + Identity describes the identity of an object. Only ascii characters are allowed type: object labels: @@ -152,14 +159,14 @@ spec: description: Label is a label that can be set on objects. properties: merge: - description: MergeAlgorithm optionally describes the - desired merge handling used to merge the label value - during a transfer. + description: |- + MergeAlgorithm optionally describes the desired merge handling used to + merge the label value during a transfer. properties: algorithm: - description: Algorithm optionally described the - Merge algorithm used to merge the label value - during a transfer. + description: |- + Algorithm optionally described the Merge algorithm used to + merge the label value during a transfer. type: string config: description: eConfig contains optional config @@ -194,7 +201,8 @@ spec: items: additionalProperties: type: string - description: Identity describes the identity of an object. + description: |- + Identity describes the identity of an object. Only ascii characters are allowed type: object type: array @@ -210,7 +218,8 @@ spec: extraIdentity: additionalProperties: type: string - description: Identity describes the identity of an object. + description: |- + Identity describes the identity of an object. Only ascii characters are allowed type: object labels: @@ -219,14 +228,14 @@ spec: description: Label is a label that can be set on objects. properties: merge: - description: MergeAlgorithm optionally describes the - desired merge handling used to merge the label value - during a transfer. + description: |- + MergeAlgorithm optionally describes the desired merge handling used to + merge the label value during a transfer. properties: algorithm: - description: Algorithm optionally described the - Merge algorithm used to merge the label value - during a transfer. + description: |- + Algorithm optionally described the Merge algorithm used to + merge the label value during a transfer. type: string config: description: eConfig contains optional config @@ -261,7 +270,8 @@ spec: items: additionalProperties: type: string - description: Identity describes the identity of an object. + description: |- + Identity describes the identity of an object. Only ascii characters are allowed type: object type: array @@ -275,17 +285,17 @@ spec: to deploy to. properties: selector: - description: A label selector is a label query over a set - of resources. The result of matchLabels and matchExpressions - are ANDed. An empty label selector matches all objects. - A null label selector matches no objects. + description: |- + A label selector is a label query over a set of resources. The result of matchLabels and + matchExpressions are ANDed. An empty label selector matches all objects. A null + label selector matches no objects. properties: matchExpressions: description: matchExpressions is a list of label selector requirements. The requirements are ANDed. items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that + description: |- + A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. properties: key: @@ -293,17 +303,16 @@ spec: applies to. type: string operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, - NotIn, Exists and DoesNotExist. + description: |- + operator represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists and DoesNotExist. type: string values: - description: values is an array of string values. - If the operator is In or NotIn, the values array - must be non-empty. If the operator is Exists - or DoesNotExist, the values array must be empty. - This array is replaced during a strategic merge - patch. + description: |- + values is an array of string values. If the operator is In or NotIn, + the values array must be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. This array is replaced during a strategic + merge patch. items: type: string type: array @@ -315,11 +324,10 @@ spec: matchLabels: additionalProperties: type: string - description: matchLabels is a map of {key,value} pairs. - A single {key,value} in the matchLabels map is equivalent - to an element of matchExpressions, whose key field - is "key", the operator is "In", and the values array - contains only "value". The requirements are ANDed. + description: |- + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, whose key field is "key", the + operator is "In", and the values array contains only "value". The requirements are ANDed. type: object type: object x-kubernetes-map-type: atomic @@ -350,21 +358,24 @@ spec: for verification. properties: name: - description: Name specifies the name of the signature. An OCM - component may have multiple signatures. + description: |- + Name specifies the name of the signature. An OCM component may have multiple + signatures. type: string publicKey: - description: PublicKey provides a reference to a Kubernetes - Secret of contain a blob of a public key that which will be - used to validate the named signature. + description: |- + PublicKey provides a reference to a Kubernetes Secret of contain a blob of a public key that + which will be used to validate the named signature. properties: secretRef: description: SecretRef is a reference to a Secret that contains a public key. properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string type: object x-kubernetes-map-type: atomic @@ -397,42 +408,42 @@ spec: conditions: items: description: "Condition contains details for one aspect of the current - state of this API Resource. --- This struct is intended for direct - use as an array at the field path .status.conditions. For example, - \n type FooStatus struct{ // Represents the observations of a - foo's current state. // Known .status.conditions.type are: \"Available\", - \"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge - // +listType=map // +listMapKey=type Conditions []metav1.Condition - `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" - protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }" + state of this API Resource.\n---\nThis struct is intended for + direct use as an array at the field path .status.conditions. For + example,\n\n\n\ttype FooStatus struct{\n\t // Represents the + observations of a foo's current state.\n\t // Known .status.conditions.type + are: \"Available\", \"Progressing\", and \"Degraded\"\n\t // + +patchMergeKey=type\n\t // +patchStrategy=merge\n\t // +listType=map\n\t + \ // +listMapKey=type\n\t Conditions []metav1.Condition `json:\"conditions,omitempty\" + patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"`\n\n\n\t + \ // other fields\n\t}" properties: lastTransitionTime: - description: lastTransitionTime is the last time the condition - transitioned from one status to another. This should be when - the underlying condition changed. If that is not known, then - using the time when the API field changed is acceptable. + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. format: date-time type: string message: - description: message is a human readable message indicating - details about the transition. This may be an empty string. + description: |- + message is a human readable message indicating details about the transition. + This may be an empty string. maxLength: 32768 type: string observedGeneration: - description: observedGeneration represents the .metadata.generation - that the condition was set based upon. For instance, if .metadata.generation - is currently 12, but the .status.conditions[x].observedGeneration - is 9, the condition is out of date with respect to the current - state of the instance. + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. format: int64 minimum: 0 type: integer reason: - description: reason contains a programmatic identifier indicating - the reason for the condition's last transition. Producers - of specific condition types may define expected values and - meanings for this field, and whether the values are considered - a guaranteed API. The value should be a CamelCase string. + description: |- + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. This field may not be empty. maxLength: 1024 minLength: 1 @@ -446,11 +457,12 @@ spec: - Unknown type: string type: - description: type of condition in CamelCase or in foo.example.com/CamelCase. - --- Many .condition.type values are consistent across resources - like Available, but because arbitrary conditions can be useful - (see .node.status.conditions), the ability to deconflict is - important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) + description: |- + type of condition in CamelCase or in foo.example.com/CamelCase. + --- + Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be + useful (see .node.status.conditions), the ability to deconflict is important. + The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) maxLength: 316 pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ type: string diff --git a/config/crd/bases/mpas.ocm.software_productdescriptions.yaml b/config/crd/bases/mpas.ocm.software_productdescriptions.yaml index a596f95..f508b26 100644 --- a/config/crd/bases/mpas.ocm.software_productdescriptions.yaml +++ b/config/crd/bases/mpas.ocm.software_productdescriptions.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.11.1 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.14.0 name: productdescriptions.mpas.ocm.software spec: group: mpas.ocm.software @@ -22,14 +21,19 @@ spec: 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' + 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' + 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 @@ -52,7 +56,8 @@ spec: extraIdentity: additionalProperties: type: string - description: Identity describes the identity of an object. + description: |- + Identity describes the identity of an object. Only ascii characters are allowed type: object labels: @@ -61,14 +66,14 @@ spec: description: Label is a label that can be set on objects. properties: merge: - description: MergeAlgorithm optionally describes - the desired merge handling used to merge the - label value during a transfer. + description: |- + MergeAlgorithm optionally describes the desired merge handling used to + merge the label value during a transfer. properties: algorithm: - description: Algorithm optionally described - the Merge algorithm used to merge the label - value during a transfer. + description: |- + Algorithm optionally described the Merge algorithm used to + merge the label value during a transfer. type: string config: description: eConfig contains optional config @@ -104,8 +109,9 @@ spec: items: additionalProperties: type: string - description: Identity describes the identity of an - object. Only ascii characters are allowed + description: |- + Identity describes the identity of an object. + Only ascii characters are allowed type: object type: array version: @@ -121,7 +127,8 @@ spec: extraIdentity: additionalProperties: type: string - description: Identity describes the identity of an object. + description: |- + Identity describes the identity of an object. Only ascii characters are allowed type: object labels: @@ -130,14 +137,14 @@ spec: description: Label is a label that can be set on objects. properties: merge: - description: MergeAlgorithm optionally describes the - desired merge handling used to merge the label value - during a transfer. + description: |- + MergeAlgorithm optionally describes the desired merge handling used to + merge the label value during a transfer. properties: algorithm: - description: Algorithm optionally described the - Merge algorithm used to merge the label value - during a transfer. + description: |- + Algorithm optionally described the Merge algorithm used to + merge the label value during a transfer. type: string config: description: eConfig contains optional config @@ -172,7 +179,8 @@ spec: items: additionalProperties: type: string - description: Identity describes the identity of an object. + description: |- + Identity describes the identity of an object. Only ascii characters are allowed type: object type: array @@ -188,7 +196,8 @@ spec: extraIdentity: additionalProperties: type: string - description: Identity describes the identity of an object. + description: |- + Identity describes the identity of an object. Only ascii characters are allowed type: object labels: @@ -197,14 +206,14 @@ spec: description: Label is a label that can be set on objects. properties: merge: - description: MergeAlgorithm optionally describes the - desired merge handling used to merge the label value - during a transfer. + description: |- + MergeAlgorithm optionally describes the desired merge handling used to + merge the label value during a transfer. properties: algorithm: - description: Algorithm optionally described the - Merge algorithm used to merge the label value - during a transfer. + description: |- + Algorithm optionally described the Merge algorithm used to + merge the label value during a transfer. type: string config: description: eConfig contains optional config @@ -239,7 +248,8 @@ spec: items: additionalProperties: type: string - description: Identity describes the identity of an object. + description: |- + Identity describes the identity of an object. Only ascii characters are allowed type: object type: array @@ -253,7 +263,8 @@ spec: extraIdentity: additionalProperties: type: string - description: Identity describes the identity of an object. + description: |- + Identity describes the identity of an object. Only ascii characters are allowed type: object labels: @@ -262,14 +273,14 @@ spec: description: Label is a label that can be set on objects. properties: merge: - description: MergeAlgorithm optionally describes the - desired merge handling used to merge the label value - during a transfer. + description: |- + MergeAlgorithm optionally describes the desired merge handling used to + merge the label value during a transfer. properties: algorithm: - description: Algorithm optionally described the - Merge algorithm used to merge the label value - during a transfer. + description: |- + Algorithm optionally described the Merge algorithm used to + merge the label value during a transfer. type: string config: description: eConfig contains optional config @@ -304,7 +315,8 @@ spec: items: additionalProperties: type: string - description: Identity describes the identity of an object. + description: |- + Identity describes the identity of an object. Only ascii characters are allowed type: object type: array @@ -327,34 +339,34 @@ spec: name: type: string selector: - description: A label selector is a label query over a set of - resources. The result of matchLabels and matchExpressions - are ANDed. An empty label selector matches all objects. A - null label selector matches no objects. + description: |- + A label selector is a label query over a set of resources. The result of matchLabels and + matchExpressions are ANDed. An empty label selector matches all objects. A null + label selector matches no objects. properties: matchExpressions: description: matchExpressions is a list of label selector requirements. The requirements are ANDed. items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that relates - the key and values. + description: |- + A label selector requirement is a selector that contains values, a key, and an operator that + relates the key and values. properties: key: description: key is the label key that the selector applies to. type: string operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, NotIn, - Exists and DoesNotExist. + description: |- + operator represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists and DoesNotExist. type: string values: - description: values is an array of string values. - If the operator is In or NotIn, the values array - must be non-empty. If the operator is Exists or - DoesNotExist, the values array must be empty. This - array is replaced during a strategic merge patch. + description: |- + values is an array of string values. If the operator is In or NotIn, + the values array must be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. This array is replaced during a strategic + merge patch. items: type: string type: array @@ -366,11 +378,10 @@ spec: matchLabels: additionalProperties: type: string - description: matchLabels is a map of {key,value} pairs. - A single {key,value} in the matchLabels map is equivalent - to an element of matchExpressions, whose key field is - "key", the operator is "In", and the values array contains - only "value". The requirements are ANDed. + description: |- + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, whose key field is "key", the + operator is "In", and the values array contains only "value". The requirements are ANDed. type: object type: object x-kubernetes-map-type: atomic diff --git a/config/crd/bases/mpas.ocm.software_targets.yaml b/config/crd/bases/mpas.ocm.software_targets.yaml index d107384..ef5fc9b 100644 --- a/config/crd/bases/mpas.ocm.software_targets.yaml +++ b/config/crd/bases/mpas.ocm.software_targets.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.11.1 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.14.0 name: targets.mpas.ocm.software spec: group: mpas.ocm.software @@ -21,14 +20,19 @@ spec: description: Target is the Schema for the targets 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' + 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' + 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 @@ -38,38 +42,38 @@ spec: access: x-kubernetes-preserve-unknown-fields: true interval: - description: Interval is the reconciliation interval, i.e. at what - interval shall a reconciliation happen. This is used to requeue - objects for reconciliation in case the related subscription hasn't - been finished yet. + description: |- + Interval is the reconciliation interval, i.e. at what interval shall a reconciliation happen. + This is used to requeue objects for reconciliation in case the related subscription hasn't been finished yet. type: string selector: - description: 'selector is a label query over secrets that should be - used for target access. If found, the secrets will added to the - target ServiceAccount as image pull secrets. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors' + description: |- + selector is a label query over secrets that should be used for target access. + If found, the secrets will added to the target ServiceAccount as image pull secrets. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors properties: matchExpressions: description: matchExpressions is a list of label selector requirements. The requirements are ANDed. items: - description: A label selector requirement is a selector that - contains values, a key, and an operator that relates the key - and values. + description: |- + A label selector requirement is a selector that contains values, a key, and an operator that + relates the key and values. properties: key: description: key is the label key that the selector applies to. type: string operator: - description: operator represents a key's relationship to - a set of values. Valid operators are In, NotIn, Exists - and DoesNotExist. + description: |- + operator represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists and DoesNotExist. type: string values: - description: values is an array of string values. If the - operator is In or NotIn, the values array must be non-empty. - If the operator is Exists or DoesNotExist, the values - array must be empty. This array is replaced during a strategic + description: |- + values is an array of string values. If the operator is In or NotIn, + the values array must be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. This array is replaced during a strategic merge patch. items: type: string @@ -82,11 +86,10 @@ spec: matchLabels: additionalProperties: type: string - description: matchLabels is a map of {key,value} pairs. A single - {key,value} in the matchLabels map is equivalent to an element - of matchExpressions, whose key field is "key", the operator - is "In", and the values array contains only "value". The requirements - are ANDed. + description: |- + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, whose key field is "key", the + operator is "In", and the values array contains only "value". The requirements are ANDed. type: object type: object x-kubernetes-map-type: atomic @@ -107,42 +110,42 @@ spec: conditions: items: description: "Condition contains details for one aspect of the current - state of this API Resource. --- This struct is intended for direct - use as an array at the field path .status.conditions. For example, - \n type FooStatus struct{ // Represents the observations of a - foo's current state. // Known .status.conditions.type are: \"Available\", - \"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge - // +listType=map // +listMapKey=type Conditions []metav1.Condition - `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" - protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }" + state of this API Resource.\n---\nThis struct is intended for + direct use as an array at the field path .status.conditions. For + example,\n\n\n\ttype FooStatus struct{\n\t // Represents the + observations of a foo's current state.\n\t // Known .status.conditions.type + are: \"Available\", \"Progressing\", and \"Degraded\"\n\t // + +patchMergeKey=type\n\t // +patchStrategy=merge\n\t // +listType=map\n\t + \ // +listMapKey=type\n\t Conditions []metav1.Condition `json:\"conditions,omitempty\" + patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"`\n\n\n\t + \ // other fields\n\t}" properties: lastTransitionTime: - description: lastTransitionTime is the last time the condition - transitioned from one status to another. This should be when - the underlying condition changed. If that is not known, then - using the time when the API field changed is acceptable. + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. format: date-time type: string message: - description: message is a human readable message indicating - details about the transition. This may be an empty string. + description: |- + message is a human readable message indicating details about the transition. + This may be an empty string. maxLength: 32768 type: string observedGeneration: - description: observedGeneration represents the .metadata.generation - that the condition was set based upon. For instance, if .metadata.generation - is currently 12, but the .status.conditions[x].observedGeneration - is 9, the condition is out of date with respect to the current - state of the instance. + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. format: int64 minimum: 0 type: integer reason: - description: reason contains a programmatic identifier indicating - the reason for the condition's last transition. Producers - of specific condition types may define expected values and - meanings for this field, and whether the values are considered - a guaranteed API. The value should be a CamelCase string. + description: |- + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. This field may not be empty. maxLength: 1024 minLength: 1 @@ -156,11 +159,12 @@ spec: - Unknown type: string type: - description: type of condition in CamelCase or in foo.example.com/CamelCase. - --- Many .condition.type values are consistent across resources - like Available, but because arbitrary conditions can be useful - (see .node.status.conditions), the ability to deconflict is - important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) + description: |- + type of condition in CamelCase or in foo.example.com/CamelCase. + --- + Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be + useful (see .node.status.conditions), the ability to deconflict is important. + The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) maxLength: 316 pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ type: string diff --git a/config/crd/bases/mpas.ocm.software_validations.yaml b/config/crd/bases/mpas.ocm.software_validations.yaml index d5f426d..d1c4b6a 100644 --- a/config/crd/bases/mpas.ocm.software_validations.yaml +++ b/config/crd/bases/mpas.ocm.software_validations.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.11.1 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.14.0 name: validations.mpas.ocm.software spec: group: mpas.ocm.software @@ -21,20 +20,26 @@ spec: description: Validation is the Schema for the validations 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' + 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' + 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: ValidationSpec defines the desired state of Validation Fetches - pull request ID and GitRepository from the Sync object. + description: |- + ValidationSpec defines the desired state of Validation + Fetches pull request ID and GitRepository from the Sync object. properties: interval: type: string @@ -71,42 +76,42 @@ spec: conditions: items: description: "Condition contains details for one aspect of the current - state of this API Resource. --- This struct is intended for direct - use as an array at the field path .status.conditions. For example, - \n type FooStatus struct{ // Represents the observations of a - foo's current state. // Known .status.conditions.type are: \"Available\", - \"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge - // +listType=map // +listMapKey=type Conditions []metav1.Condition - `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" - protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }" + state of this API Resource.\n---\nThis struct is intended for + direct use as an array at the field path .status.conditions. For + example,\n\n\n\ttype FooStatus struct{\n\t // Represents the + observations of a foo's current state.\n\t // Known .status.conditions.type + are: \"Available\", \"Progressing\", and \"Degraded\"\n\t // + +patchMergeKey=type\n\t // +patchStrategy=merge\n\t // +listType=map\n\t + \ // +listMapKey=type\n\t Conditions []metav1.Condition `json:\"conditions,omitempty\" + patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"`\n\n\n\t + \ // other fields\n\t}" properties: lastTransitionTime: - description: lastTransitionTime is the last time the condition - transitioned from one status to another. This should be when - the underlying condition changed. If that is not known, then - using the time when the API field changed is acceptable. + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. format: date-time type: string message: - description: message is a human readable message indicating - details about the transition. This may be an empty string. + description: |- + message is a human readable message indicating details about the transition. + This may be an empty string. maxLength: 32768 type: string observedGeneration: - description: observedGeneration represents the .metadata.generation - that the condition was set based upon. For instance, if .metadata.generation - is currently 12, but the .status.conditions[x].observedGeneration - is 9, the condition is out of date with respect to the current - state of the instance. + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. format: int64 minimum: 0 type: integer reason: - description: reason contains a programmatic identifier indicating - the reason for the condition's last transition. Producers - of specific condition types may define expected values and - meanings for this field, and whether the values are considered - a guaranteed API. The value should be a CamelCase string. + description: |- + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. This field may not be empty. maxLength: 1024 minLength: 1 @@ -120,11 +125,12 @@ spec: - Unknown type: string type: - description: type of condition in CamelCase or in foo.example.com/CamelCase. - --- Many .condition.type values are consistent across resources - like Available, but because arbitrary conditions can be useful - (see .node.status.conditions), the ability to deconflict is - important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) + description: |- + type of condition in CamelCase or in foo.example.com/CamelCase. + --- + Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be + useful (see .node.status.conditions), the ability to deconflict is important. + The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) maxLength: 316 pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ type: string diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index d699f06..643ee8f 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -2,7 +2,6 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: - creationTimestamp: null name: mpas-product-controller-role rules: - apiGroups: diff --git a/controllers/productdeployment_controller.go b/controllers/productdeployment_controller.go index e5c04ed..07ec56d 100644 --- a/controllers/productdeployment_controller.go +++ b/controllers/productdeployment_controller.go @@ -200,10 +200,9 @@ func (r *ProductDeploymentReconciler) reconcile(ctx context.Context, obj *v1alph obj.Status.ActivePipelines = nil for _, ep := range existingPipelines.Items { - ep := ep alreadyCreatedPipelines[ep.Name] = struct{}{} - if !conditions.IsTrue(&ep, meta.ReadyCondition) { + if !conditions.IsTrue(&ep, meta.ReadyCondition) { //nolint: gosec // it's 1.22 obj.Status.ActivePipelines = append(obj.Status.ActivePipelines, ep.Name) } } @@ -405,9 +404,7 @@ func (r *ProductDeploymentReconciler) generateConfigMap(ctx context.Context, obj // garbage collect old configmaps var errf error for _, cm := range existingMaps.Items { - cm := cm - err := r.Client.Delete(ctx, &cm) - if err != nil { + if err := r.Client.Delete(ctx, &cm); err != nil { //nolint:gosec // go 1.22 errf = errors.Join(errf, err) } } diff --git a/controllers/productdeploymentgenerator_controller.go b/controllers/productdeploymentgenerator_controller.go index d2623c9..74498fc 100644 --- a/controllers/productdeploymentgenerator_controller.go +++ b/controllers/productdeploymentgenerator_controller.go @@ -66,7 +66,6 @@ const ( ` componentVersionAnnotationKey = "mpas.ocm.system/component-version" componentNameAnnotationKey = "mpas.ocm.system/component-name" - ignoreMarker = "+mpas-ignore" ) const ( @@ -406,6 +405,7 @@ func (r *ProductDeploymentGeneratorReconciler) createSync( Message: project.Spec.Git.CommitTemplate.Message, BaseBranch: project.Spec.Git.DefaultBranch, }, + PullRequestTemplate: gitv1alpha1.PullRequestTemplate{ Title: fmt.Sprintf("MPAS System Automated Pull Request for Product: %s", prodDesc.Name), }, @@ -582,9 +582,9 @@ func (r *ProductDeploymentGeneratorReconciler) createProductPipeline( // if the list is empty, select one from the available targets. for _, role := range description.Spec.TargetRoles { - role := role if role.Name == p.TargetRoleName { - targetRole = &role.TargetRole + t := role.TargetRole + targetRole = &t break } diff --git a/go.mod b/go.mod index b47f300..cac6f42 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/open-component-model/mpas-product-controller -go 1.21 +go 1.22.1 replace github.com/opencontainers/go-digest => github.com/opencontainers/go-digest v1.0.1-0.20220411205349-bde1400a84be