Skip to content

Commit

Permalink
chore: fix lint errors
Browse files Browse the repository at this point in the history
Signed-off-by: ashish <asnaraya@redhat.com>
  • Loading branch information
ashishmax31 committed Jul 15, 2024
1 parent 42344e3 commit 1ecb534
Show file tree
Hide file tree
Showing 11 changed files with 70 additions and 37 deletions.
2 changes: 1 addition & 1 deletion api/v1alpha1/addon_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`

Expand Down
2 changes: 1 addition & 1 deletion api/v1alpha1/addoninstance_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions api/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions boilerplate/openshift/golang-osd-operator/golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,7 @@ linters-settings:
extra-words:
- typo: "openshit"
correction: "OpenShift"
ignore-words:
- reconcilation
- reconcilations
- Reconcilation
2 changes: 1 addition & 1 deletion controllers/addon/phase_observe_operatorresource.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ func (r *olmReconciler) observeOperatorResource(
case operatorsv1alpha1.CSVPhaseFailed:
message = "failed"
default:
message = "unkown/pending"
message = "unknown/pending"
}

if message != "" {
Expand Down
2 changes: 1 addition & 1 deletion controllers/addon/phase_observe_operatorresource_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ func TestObserveOperatorResource(t *testing.T) {
Result: resultRetry,
},
},
"Phase succeded": {
"Phase succeeded": {
operatorResource: &operatorsv1.Operator{
Status: operatorsv1.OperatorStatus{
Components: &operatorsv1.Components{
Expand Down
2 changes: 1 addition & 1 deletion controllers/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
22 changes: 16 additions & 6 deletions deploy/crds/addons.managed.openshift.io_addoninstances.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -139,3 +143,9 @@ spec:
storage: true
subresources:
status: {}
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []
22 changes: 16 additions & 6 deletions deploy/crds/addons.managed.openshift.io_addonoperators.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -178,3 +182,9 @@ spec:
storage: true
subresources:
status: {}
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []
46 changes: 27 additions & 19 deletions deploy/crds/addons.managed.openshift.io_addons.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand All @@ -310,7 +312,6 @@ spec:
required:
- key
type: object
x-kubernetes-map-type: atomic
secret:
description: Secret containing data to use for
the targets.
Expand All @@ -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
Expand All @@ -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:
Expand Down Expand Up @@ -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.
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -609,3 +611,9 @@ spec:
storage: true
subresources:
status: {}
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []
2 changes: 1 addition & 1 deletion docs/api-reference/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]()
Expand Down

0 comments on commit 1ecb534

Please sign in to comment.