diff --git a/.golangci-kal.yml b/.golangci-kal.yml
index 17f06c988..3beb9fcde 100644
--- a/.golangci-kal.yml
+++ b/.golangci-kal.yml
@@ -30,6 +30,7 @@ linters:
- "statussubresource"
- "uniquemarkers"
- "jsontags"
+ - "statusoptional"
disable:
- "*"
lintersConfig:
diff --git a/Documentation/api-reference/api.md b/Documentation/api-reference/api.md
index 308bc1fd0..bdcdc62b7 100644
--- a/Documentation/api-reference/api.md
+++ b/Documentation/api-reference/api.md
@@ -7210,6 +7210,7 @@ bool
+(Optional)
Represents whether any actions on the underlying managed objects are
being performed. Only delete actions will be performed.
|
@@ -7222,6 +7223,7 @@ int32
+(Optional)
Total number of non-terminated pods targeted by this Alertmanager
object (their labels match the selector).
|
@@ -7234,6 +7236,7 @@ int32
+(Optional)
Total number of non-terminated pods targeted by this Alertmanager
object that have the desired version spec.
|
@@ -7246,6 +7249,7 @@ int32
+(Optional)
Total number of available pods (ready for at least minReadySeconds)
targeted by this Alertmanager cluster.
|
@@ -7258,6 +7262,7 @@ int32
+(Optional)
Total number of unavailable pods targeted by this Alertmanager object.
|
@@ -15591,6 +15596,7 @@ bool
+(Optional)
Represents whether any actions on the underlying managed objects are
being performed. Only delete actions will be performed.
|
@@ -15603,6 +15609,7 @@ int32
+(Optional)
Total number of non-terminated pods targeted by this Prometheus deployment
(their labels match the selector).
|
@@ -15615,6 +15622,7 @@ int32
+(Optional)
Total number of non-terminated pods targeted by this Prometheus deployment
that have the desired version spec.
|
@@ -15627,6 +15635,7 @@ int32
+(Optional)
Total number of available pods (ready for at least minReadySeconds)
targeted by this Prometheus deployment.
|
@@ -15639,6 +15648,7 @@ int32
+(Optional)
Total number of unavailable pods targeted by this Prometheus deployment.
|
@@ -19642,6 +19652,7 @@ bool
+(Optional)
Represents whether any actions on the underlying managed objects are
being performed. Only delete actions will be performed.
|
@@ -19654,6 +19665,7 @@ int32
+(Optional)
Total number of non-terminated pods targeted by this ThanosRuler deployment
(their labels match the selector).
|
@@ -19666,6 +19678,7 @@ int32
+(Optional)
Total number of non-terminated pods targeted by this ThanosRuler deployment
that have the desired version spec.
|
@@ -19678,6 +19691,7 @@ int32
+(Optional)
Total number of available pods (ready for at least minReadySeconds)
targeted by this ThanosRuler deployment.
|
@@ -19690,6 +19704,7 @@ int32
+(Optional)
Total number of unavailable pods targeted by this ThanosRuler deployment.
|
diff --git a/bundle.yaml b/bundle.yaml
index c50974030..be74e3c76 100644
--- a/bundle.yaml
+++ b/bundle.yaml
@@ -21444,12 +21444,6 @@ spec:
object that have the desired version spec.
format: int32
type: integer
- required:
- - availableReplicas
- - paused
- - replicas
- - unavailableReplicas
- - updatedReplicas
type: object
required:
- spec
@@ -35236,12 +35230,6 @@ spec:
that have the desired version spec.
format: int32
type: integer
- required:
- - availableReplicas
- - paused
- - replicas
- - unavailableReplicas
- - updatedReplicas
type: object
required:
- spec
@@ -48758,12 +48746,6 @@ spec:
that have the desired version spec.
format: int32
type: integer
- required:
- - availableReplicas
- - paused
- - replicas
- - unavailableReplicas
- - updatedReplicas
type: object
required:
- spec
@@ -72463,12 +72445,6 @@ spec:
that have the desired version spec.
format: int32
type: integer
- required:
- - availableReplicas
- - paused
- - replicas
- - unavailableReplicas
- - updatedReplicas
type: object
required:
- spec
diff --git a/example/prometheus-operator-crd-full/monitoring.coreos.com_alertmanagers.yaml b/example/prometheus-operator-crd-full/monitoring.coreos.com_alertmanagers.yaml
index 3e83a636e..9a17d479c 100644
--- a/example/prometheus-operator-crd-full/monitoring.coreos.com_alertmanagers.yaml
+++ b/example/prometheus-operator-crd-full/monitoring.coreos.com_alertmanagers.yaml
@@ -9786,12 +9786,6 @@ spec:
object that have the desired version spec.
format: int32
type: integer
- required:
- - availableReplicas
- - paused
- - replicas
- - unavailableReplicas
- - updatedReplicas
type: object
required:
- spec
diff --git a/example/prometheus-operator-crd-full/monitoring.coreos.com_prometheusagents.yaml b/example/prometheus-operator-crd-full/monitoring.coreos.com_prometheusagents.yaml
index 3f88bd61e..d54841de4 100644
--- a/example/prometheus-operator-crd-full/monitoring.coreos.com_prometheusagents.yaml
+++ b/example/prometheus-operator-crd-full/monitoring.coreos.com_prometheusagents.yaml
@@ -11249,12 +11249,6 @@ spec:
that have the desired version spec.
format: int32
type: integer
- required:
- - availableReplicas
- - paused
- - replicas
- - unavailableReplicas
- - updatedReplicas
type: object
required:
- spec
diff --git a/example/prometheus-operator-crd-full/monitoring.coreos.com_prometheuses.yaml b/example/prometheus-operator-crd-full/monitoring.coreos.com_prometheuses.yaml
index 4f92bec8b..7f97c40d9 100644
--- a/example/prometheus-operator-crd-full/monitoring.coreos.com_prometheuses.yaml
+++ b/example/prometheus-operator-crd-full/monitoring.coreos.com_prometheuses.yaml
@@ -13500,12 +13500,6 @@ spec:
that have the desired version spec.
format: int32
type: integer
- required:
- - availableReplicas
- - paused
- - replicas
- - unavailableReplicas
- - updatedReplicas
type: object
required:
- spec
diff --git a/example/prometheus-operator-crd-full/monitoring.coreos.com_thanosrulers.yaml b/example/prometheus-operator-crd-full/monitoring.coreos.com_thanosrulers.yaml
index bdf1b1317..25a77aa38 100644
--- a/example/prometheus-operator-crd-full/monitoring.coreos.com_thanosrulers.yaml
+++ b/example/prometheus-operator-crd-full/monitoring.coreos.com_thanosrulers.yaml
@@ -9586,12 +9586,6 @@ spec:
that have the desired version spec.
format: int32
type: integer
- required:
- - availableReplicas
- - paused
- - replicas
- - unavailableReplicas
- - updatedReplicas
type: object
required:
- spec
diff --git a/example/prometheus-operator-crd/monitoring.coreos.com_alertmanagers.yaml b/example/prometheus-operator-crd/monitoring.coreos.com_alertmanagers.yaml
index 112b33e65..f6daf97b0 100644
--- a/example/prometheus-operator-crd/monitoring.coreos.com_alertmanagers.yaml
+++ b/example/prometheus-operator-crd/monitoring.coreos.com_alertmanagers.yaml
@@ -9787,12 +9787,6 @@ spec:
object that have the desired version spec.
format: int32
type: integer
- required:
- - availableReplicas
- - paused
- - replicas
- - unavailableReplicas
- - updatedReplicas
type: object
required:
- spec
diff --git a/example/prometheus-operator-crd/monitoring.coreos.com_prometheusagents.yaml b/example/prometheus-operator-crd/monitoring.coreos.com_prometheusagents.yaml
index 8e3f12b7b..d6276d79d 100644
--- a/example/prometheus-operator-crd/monitoring.coreos.com_prometheusagents.yaml
+++ b/example/prometheus-operator-crd/monitoring.coreos.com_prometheusagents.yaml
@@ -11250,12 +11250,6 @@ spec:
that have the desired version spec.
format: int32
type: integer
- required:
- - availableReplicas
- - paused
- - replicas
- - unavailableReplicas
- - updatedReplicas
type: object
required:
- spec
diff --git a/example/prometheus-operator-crd/monitoring.coreos.com_prometheuses.yaml b/example/prometheus-operator-crd/monitoring.coreos.com_prometheuses.yaml
index 92c4b9856..e55d3d07d 100644
--- a/example/prometheus-operator-crd/monitoring.coreos.com_prometheuses.yaml
+++ b/example/prometheus-operator-crd/monitoring.coreos.com_prometheuses.yaml
@@ -13501,12 +13501,6 @@ spec:
that have the desired version spec.
format: int32
type: integer
- required:
- - availableReplicas
- - paused
- - replicas
- - unavailableReplicas
- - updatedReplicas
type: object
required:
- spec
diff --git a/example/prometheus-operator-crd/monitoring.coreos.com_thanosrulers.yaml b/example/prometheus-operator-crd/monitoring.coreos.com_thanosrulers.yaml
index 8f32485db..7d41b6b5f 100644
--- a/example/prometheus-operator-crd/monitoring.coreos.com_thanosrulers.yaml
+++ b/example/prometheus-operator-crd/monitoring.coreos.com_thanosrulers.yaml
@@ -9587,12 +9587,6 @@ spec:
that have the desired version spec.
format: int32
type: integer
- required:
- - availableReplicas
- - paused
- - replicas
- - unavailableReplicas
- - updatedReplicas
type: object
required:
- spec
diff --git a/jsonnet/prometheus-operator/alertmanagers-crd.json b/jsonnet/prometheus-operator/alertmanagers-crd.json
index 41d7506c1..a7e2f59d8 100644
--- a/jsonnet/prometheus-operator/alertmanagers-crd.json
+++ b/jsonnet/prometheus-operator/alertmanagers-crd.json
@@ -8232,13 +8232,6 @@
"type": "integer"
}
},
- "required": [
- "availableReplicas",
- "paused",
- "replicas",
- "unavailableReplicas",
- "updatedReplicas"
- ],
"type": "object"
}
},
diff --git a/jsonnet/prometheus-operator/prometheusagents-crd.json b/jsonnet/prometheus-operator/prometheusagents-crd.json
index 6041d8173..9963be22f 100644
--- a/jsonnet/prometheus-operator/prometheusagents-crd.json
+++ b/jsonnet/prometheus-operator/prometheusagents-crd.json
@@ -9252,13 +9252,6 @@
"type": "integer"
}
},
- "required": [
- "availableReplicas",
- "paused",
- "replicas",
- "unavailableReplicas",
- "updatedReplicas"
- ],
"type": "object"
}
},
diff --git a/jsonnet/prometheus-operator/prometheuses-crd.json b/jsonnet/prometheus-operator/prometheuses-crd.json
index 8e9d73215..4e9078613 100644
--- a/jsonnet/prometheus-operator/prometheuses-crd.json
+++ b/jsonnet/prometheus-operator/prometheuses-crd.json
@@ -11207,13 +11207,6 @@
"type": "integer"
}
},
- "required": [
- "availableReplicas",
- "paused",
- "replicas",
- "unavailableReplicas",
- "updatedReplicas"
- ],
"type": "object"
}
},
diff --git a/jsonnet/prometheus-operator/thanosrulers-crd.json b/jsonnet/prometheus-operator/thanosrulers-crd.json
index 1516e9edc..3bd410840 100644
--- a/jsonnet/prometheus-operator/thanosrulers-crd.json
+++ b/jsonnet/prometheus-operator/thanosrulers-crd.json
@@ -7965,13 +7965,6 @@
"type": "integer"
}
},
- "required": [
- "availableReplicas",
- "paused",
- "replicas",
- "unavailableReplicas",
- "updatedReplicas"
- ],
"type": "object"
}
},
diff --git a/pkg/apis/monitoring/v1/alertmanager_types.go b/pkg/apis/monitoring/v1/alertmanager_types.go
index 4162fc83e..7a8674507 100644
--- a/pkg/apis/monitoring/v1/alertmanager_types.go
+++ b/pkg/apis/monitoring/v1/alertmanager_types.go
@@ -499,22 +499,22 @@ type AlertmanagerGlobalConfig struct {
type AlertmanagerStatus struct {
// Represents whether any actions on the underlying managed objects are
// being performed. Only delete actions will be performed.
- // +required
+ // +optional
Paused bool `json:"paused"`
// Total number of non-terminated pods targeted by this Alertmanager
// object (their labels match the selector).
- // +required
+ // +optional
Replicas int32 `json:"replicas"`
// Total number of non-terminated pods targeted by this Alertmanager
// object that have the desired version spec.
- // +required
+ // +optional
UpdatedReplicas int32 `json:"updatedReplicas"`
// Total number of available pods (ready for at least minReadySeconds)
// targeted by this Alertmanager cluster.
- // +required
+ // +optional
AvailableReplicas int32 `json:"availableReplicas"`
// Total number of unavailable pods targeted by this Alertmanager object.
- // +required
+ // +optional
UnavailableReplicas int32 `json:"unavailableReplicas"`
// The selector used to match the pods targeted by this Alertmanager object.
// +optional
diff --git a/pkg/apis/monitoring/v1/prometheus_types.go b/pkg/apis/monitoring/v1/prometheus_types.go
index 8dd07c6b8..77a921690 100644
--- a/pkg/apis/monitoring/v1/prometheus_types.go
+++ b/pkg/apis/monitoring/v1/prometheus_types.go
@@ -1351,22 +1351,22 @@ type PrometheusTracingConfig struct {
type PrometheusStatus struct {
// Represents whether any actions on the underlying managed objects are
// being performed. Only delete actions will be performed.
- // +required
+ // +optional
Paused bool `json:"paused"`
// Total number of non-terminated pods targeted by this Prometheus deployment
// (their labels match the selector).
- // +required
+ // +optional
Replicas int32 `json:"replicas"`
// Total number of non-terminated pods targeted by this Prometheus deployment
// that have the desired version spec.
- // +required
+ // +optional
UpdatedReplicas int32 `json:"updatedReplicas"`
// Total number of available pods (ready for at least minReadySeconds)
// targeted by this Prometheus deployment.
- // +required
+ // +optional
AvailableReplicas int32 `json:"availableReplicas"`
// Total number of unavailable pods targeted by this Prometheus deployment.
- // +required
+ // +optional
UnavailableReplicas int32 `json:"unavailableReplicas"`
// The current state of the Prometheus deployment.
// +listType=map
diff --git a/pkg/apis/monitoring/v1/thanos_types.go b/pkg/apis/monitoring/v1/thanos_types.go
index 90f59affd..ef035e8c2 100644
--- a/pkg/apis/monitoring/v1/thanos_types.go
+++ b/pkg/apis/monitoring/v1/thanos_types.go
@@ -540,22 +540,22 @@ type ThanosRulerWebSpec struct {
type ThanosRulerStatus struct {
// Represents whether any actions on the underlying managed objects are
// being performed. Only delete actions will be performed.
- // +required
+ // +optional
Paused bool `json:"paused"`
// Total number of non-terminated pods targeted by this ThanosRuler deployment
// (their labels match the selector).
- // +required
+ // +optional
Replicas int32 `json:"replicas"`
// Total number of non-terminated pods targeted by this ThanosRuler deployment
// that have the desired version spec.
- // +required
+ // +optional
UpdatedReplicas int32 `json:"updatedReplicas"`
// Total number of available pods (ready for at least minReadySeconds)
// targeted by this ThanosRuler deployment.
- // +required
+ // +optional
AvailableReplicas int32 `json:"availableReplicas"`
// Total number of unavailable pods targeted by this ThanosRuler deployment.
- // +required
+ // +optional
UnavailableReplicas int32 `json:"unavailableReplicas"`
// The current state of the ThanosRuler object.
// +listType=map