diff --git a/api/v1alpha1/addon_types.go b/api/v1alpha1/addon_types.go index 32171339..fd0afcee 100644 --- a/api/v1alpha1/addon_types.go +++ b/api/v1alpha1/addon_types.go @@ -127,7 +127,7 @@ type MonitoringSpec struct { // Configuration parameters to be injected in the ServiceMonitor used for federation. // The target prometheus server found by matchLabels needs to serve service-ca signed TLS traffic // (https://docs.openshift.com/container-platform/4.6/security/certificate_types_descriptions/service-ca-certificates.html), - // and it needs to be runing inside the namespace specified by `.monitoring.federation.namespace` + // and it needs to be running inside the namespace specified by `.monitoring.federation.namespace` // with the service name 'prometheus'. Federation *MonitoringFederationSpec `json:"federation,omitempty"` diff --git a/api/v1alpha1/addoninstance_types.go b/api/v1alpha1/addoninstance_types.go index fa6718d7..b52f73b6 100644 --- a/api/v1alpha1/addoninstance_types.go +++ b/api/v1alpha1/addoninstance_types.go @@ -111,7 +111,7 @@ const ( // Higher level controllers are advised to stop actions that might further worsen the state of the service. // For example: delaying upgrades until the status is cleared. AddonInstanceConditionHealthy AddonInstanceCondition = "Healthy" - // AddonInstanceDegraded reports partial lose of functionallity which otherwise + // AddonInstanceDegraded reports partial lose of functionality which otherwise // does not affect the availability of an addon. AddonInstanceConditionDegraded AddonInstanceCondition = "Degraded" // AddonInstanceConditionInstalled reports installation status as either diff --git a/api/v1alpha1/zz_generated.deepcopy.go b/api/v1alpha1/zz_generated.deepcopy.go index 8d57a424..eeb14f8b 100644 --- a/api/v1alpha1/zz_generated.deepcopy.go +++ b/api/v1alpha1/zz_generated.deepcopy.go @@ -1,4 +1,5 @@ //go:build !ignore_autogenerated +// +build !ignore_autogenerated // Code generated by controller-gen. DO NOT EDIT. diff --git a/boilerplate/openshift/golang-osd-operator/golangci.yml b/boilerplate/openshift/golang-osd-operator/golangci.yml index b489f3ba..b171fbca 100644 --- a/boilerplate/openshift/golang-osd-operator/golangci.yml +++ b/boilerplate/openshift/golang-osd-operator/golangci.yml @@ -31,3 +31,7 @@ linters-settings: extra-words: - typo: "openshit" correction: "OpenShift" + ignore-words: + - reconcilation + - reconcilations + - Reconcilation diff --git a/controllers/addon/phase_observe_operatorresource.go b/controllers/addon/phase_observe_operatorresource.go index 41a55e95..9d50bf42 100644 --- a/controllers/addon/phase_observe_operatorresource.go +++ b/controllers/addon/phase_observe_operatorresource.go @@ -100,7 +100,7 @@ func (r *olmReconciler) observeOperatorResource( case operatorsv1alpha1.CSVPhaseFailed: message = "failed" default: - message = "unkown/pending" + message = "unknown/pending" } if message != "" { diff --git a/controllers/addon/phase_observe_operatorresource_test.go b/controllers/addon/phase_observe_operatorresource_test.go index 4744d0f2..ff0018e0 100644 --- a/controllers/addon/phase_observe_operatorresource_test.go +++ b/controllers/addon/phase_observe_operatorresource_test.go @@ -100,7 +100,7 @@ func TestObserveOperatorResource(t *testing.T) { Result: resultRetry, }, }, - "Phase succeded": { + "Phase succeeded": { operatorResource: &operatorsv1.Operator{ Status: operatorsv1.OperatorStatus{ Components: &operatorsv1.Components{ diff --git a/controllers/errors.go b/controllers/errors.go index 13f891ff..26fcf528 100644 --- a/controllers/errors.go +++ b/controllers/errors.go @@ -25,7 +25,7 @@ var ( ErrGetAddon = newControllerReconcileError("err_get_addon") // An error happened while syncing with external APIs ErrSyncWithExternalAPIs = newControllerReconcileError("err_sync_with_external_apis") - // An OCM client request error was encountred + // An OCM client request error was encountered ErrOCMClientRequest = newControllerReconcileError("err_ocm_client_request") // Failed to update an addon ErrUpdateAddon = newControllerReconcileError("err_update_addon") diff --git a/deploy/crds/addons.managed.openshift.io_addoninstances.yaml b/deploy/crds/addons.managed.openshift.io_addoninstances.yaml index 2570c665..31ef6dc0 100644 --- a/deploy/crds/addons.managed.openshift.io_addoninstances.yaml +++ b/deploy/crds/addons.managed.openshift.io_addoninstances.yaml @@ -1,9 +1,11 @@ + --- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.13.0 + controller-gen.kubebuilder.io/version: v0.6.2 + creationTimestamp: null name: addoninstances.addons.managed.openshift.io spec: group: addons.managed.openshift.io @@ -62,12 +64,14 @@ spec: 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 + \n \ttype FooStatus struct{ \t // Represents the observations + of a foo's current state. \t // Known .status.conditions.type + are: \"Available\", \"Progressing\", and \"Degraded\" \t // + +patchMergeKey=type \t // +patchStrategy=merge \t // +listType=map + \t // +listMapKey=type \t Conditions []metav1.Condition `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" - protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }" + protobuf:\"bytes,1,rep,name=conditions\"` \n \t // other fields + \t}" properties: lastTransitionTime: description: lastTransitionTime is the last time the condition @@ -139,3 +143,9 @@ spec: storage: true subresources: status: {} +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] diff --git a/deploy/crds/addons.managed.openshift.io_addonoperators.yaml b/deploy/crds/addons.managed.openshift.io_addonoperators.yaml index ed6b2c29..beb5433a 100644 --- a/deploy/crds/addons.managed.openshift.io_addonoperators.yaml +++ b/deploy/crds/addons.managed.openshift.io_addonoperators.yaml @@ -1,9 +1,11 @@ + --- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.13.0 + controller-gen.kubebuilder.io/version: v0.6.2 + creationTimestamp: null name: addonoperators.addons.managed.openshift.io spec: group: addons.managed.openshift.io @@ -96,12 +98,14 @@ spec: 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 + \n \ttype FooStatus struct{ \t // Represents the observations + of a foo's current state. \t // Known .status.conditions.type + are: \"Available\", \"Progressing\", and \"Degraded\" \t // + +patchMergeKey=type \t // +patchStrategy=merge \t // +listType=map + \t // +listMapKey=type \t Conditions []metav1.Condition `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" - protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }" + protobuf:\"bytes,1,rep,name=conditions\"` \n \t // other fields + \t}" properties: lastTransitionTime: description: lastTransitionTime is the last time the condition @@ -178,3 +182,9 @@ spec: storage: true subresources: status: {} +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] diff --git a/deploy/crds/addons.managed.openshift.io_addons.yaml b/deploy/crds/addons.managed.openshift.io_addons.yaml index b47a9f4b..e568474b 100644 --- a/deploy/crds/addons.managed.openshift.io_addons.yaml +++ b/deploy/crds/addons.managed.openshift.io_addons.yaml @@ -1,9 +1,11 @@ + --- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.13.0 + controller-gen.kubebuilder.io/version: v0.6.2 + creationTimestamp: null name: addons.addons.managed.openshift.io spec: group: addons.managed.openshift.io @@ -240,7 +242,7 @@ spec: description: Configuration parameters to be injected in the ServiceMonitor used for federation. The target prometheus server found by matchLabels needs to serve service-ca signed TLS traffic (https://docs.openshift.com/container-platform/4.6/security/certificate_types_descriptions/service-ca-certificates.html), - and it needs to be runing inside the namespace specified by + and it needs to be running inside the namespace specified by `.monitoring.federation.namespace` with the service name 'prometheus'. properties: matchLabels: @@ -287,8 +289,8 @@ spec: description: OAuth2 config for the remote write URL properties: clientId: - description: The secret or configmap containing the - OAuth2 client id + description: '`clientId` specifies a key of a Secret + or ConfigMap containing the OAuth2 client''s ID.' properties: configMap: description: ConfigMap containing data to use @@ -310,7 +312,6 @@ spec: required: - key type: object - x-kubernetes-map-type: atomic secret: description: Secret containing data to use for the targets. @@ -332,11 +333,10 @@ spec: required: - key type: object - x-kubernetes-map-type: atomic type: object clientSecret: - description: The secret containing the OAuth2 client - secret + description: '`clientSecret` specifies a key of a + Secret containing the OAuth2 client''s secret.' properties: key: description: The key of the secret to select from. Must @@ -355,19 +355,21 @@ spec: required: - key type: object - x-kubernetes-map-type: atomic endpointParams: additionalProperties: type: string - description: Parameters to append to the token URL + description: '`endpointParams` configures the HTTP + parameters to append to the token URL.' type: object scopes: - description: OAuth2 scopes used for the token request + description: '`scopes` defines the OAuth2 scopes used + for the token request.' items: type: string type: array tokenUrl: - description: The URL to fetch the token from + description: '`tokenURL` configures the URL to fetch + the token from.' minLength: 1 type: string required: @@ -439,7 +441,6 @@ spec: TODO: Add other useful fields. apiVersion, kind, uid?' type: string type: object - x-kubernetes-map-type: atomic sourceSecret: description: Source secret name in the Addon Operator install namespace. @@ -449,7 +450,6 @@ spec: TODO: Add other useful fields. apiVersion, kind, uid?' type: string type: object - x-kubernetes-map-type: atomic required: - destinationSecret - sourceSecret @@ -487,12 +487,14 @@ spec: 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 + \n \ttype FooStatus struct{ \t // Represents the observations + of a foo's current state. \t // Known .status.conditions.type + are: \"Available\", \"Progressing\", and \"Degraded\" \t // + +patchMergeKey=type \t // +patchStrategy=merge \t // +listType=map + \t // +listMapKey=type \t Conditions []metav1.Condition `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" - protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }" + protobuf:\"bytes,1,rep,name=conditions\"` \n \t // other fields + \t}" properties: lastTransitionTime: description: lastTransitionTime is the last time the condition @@ -609,3 +611,9 @@ spec: storage: true subresources: status: {} +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] diff --git a/docs/api-reference/_index.md b/docs/api-reference/_index.md index 41402dc8..6e803e87 100644 --- a/docs/api-reference/_index.md +++ b/docs/api-reference/_index.md @@ -274,7 +274,7 @@ Tracks the last state last reported to the Upgrade Policy endpoint. | Field | Description | Scheme | Required | | ----- | ----------- | ------ | -------- | -| federation | Configuration parameters to be injected in the ServiceMonitor used for federation. The target prometheus server found by matchLabels needs to serve service-ca signed TLS traffic (https://docs.openshift.com/container-platform/4.6/security/certificate_types_descriptions/service-ca-certificates.html), and it needs to be runing inside the namespace specified by `.monitoring.federation.namespace` with the service name 'prometheus'. | *[MonitoringFederationSpec.api.managed.openshift.io/v1alpha1](#monitoringfederationspecapimanagedopenshiftiov1alpha1) | false | +| federation | Configuration parameters to be injected in the ServiceMonitor used for federation. The target prometheus server found by matchLabels needs to serve service-ca signed TLS traffic (https://docs.openshift.com/container-platform/4.6/security/certificate_types_descriptions/service-ca-certificates.html), and it needs to be running inside the namespace specified by `.monitoring.federation.namespace` with the service name 'prometheus'. | *[MonitoringFederationSpec.api.managed.openshift.io/v1alpha1](#monitoringfederationspecapimanagedopenshiftiov1alpha1) | false | | monitoringStack | Settings For Monitoring Stack | *[MonitoringStackSpec.api.managed.openshift.io/v1alpha1](#monitoringstackspecapimanagedopenshiftiov1alpha1) | false | [Back to Group]()