Skip to content

Commit c95d216

Browse files
committed
OLM related improvements: RBAC, Downward API for annotation, etc. (#1363)
* OLM related improvements: RBAC, Downward API for annotation, etc. * Update CHANGELOG * Fix tests
1 parent 8d29944 commit c95d216

File tree

6 files changed

+45
-34
lines changed

6 files changed

+45
-34
lines changed

Diff for: CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
* Resources for alert manager deployment and configuration
99
* Alerting rules with alert examples from Kafka and Zookeeper metrics
1010
* Enrich configuration options for off cluster access
11+
* Support for watching all namespaces
12+
* Operator Lifecycle Manager integration
1113

1214
## 0.10.0
1315

Diff for: cluster-operator/src/main/java/io/strimzi/operator/cluster/ClusterOperatorConfig.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public static ClusterOperatorConfig fromMap(Map<String, String> map) {
7979
String namespacesList = map.get(ClusterOperatorConfig.STRIMZI_NAMESPACE);
8080
Set<String> namespaces;
8181
if (namespacesList == null || namespacesList.isEmpty()) {
82-
throw new InvalidConfigurationException(ClusterOperatorConfig.STRIMZI_NAMESPACE + " cannot be null");
82+
namespaces = Collections.singleton(AbstractWatchableResourceOperator.ANY_NAMESPACE);
8383
} else {
8484
if (namespacesList.trim().equals(AbstractWatchableResourceOperator.ANY_NAMESPACE)) {
8585
namespaces = Collections.singleton(AbstractWatchableResourceOperator.ANY_NAMESPACE);

Diff for: cluster-operator/src/test/java/io/strimzi/operator/cluster/ClusterOperatorConfigTest.java

+6-6
Original file line numberDiff line numberDiff line change
@@ -95,19 +95,19 @@ public void testListOfNamespacesWithSpaces() {
9595
assertEquals(new HashSet<>(asList("foo", "bar", "baz")), config.getNamespaces());
9696
}
9797

98-
@Test(expected = InvalidConfigurationException.class)
98+
@Test
9999
public void testNoNamespace() {
100-
101100
Map<String, String> envVars = new HashMap<>(ClusterOperatorConfigTest.envVars);
102101
envVars.remove(ClusterOperatorConfig.STRIMZI_NAMESPACE);
103102

104-
ClusterOperatorConfig.fromMap(envVars);
103+
ClusterOperatorConfig config = ClusterOperatorConfig.fromMap(envVars);
104+
assertEquals(new HashSet<>(asList("*")), config.getNamespaces());
105105
}
106106

107-
@Test(expected = InvalidConfigurationException.class)
107+
@Test
108108
public void testEmptyEnvVars() {
109-
110-
ClusterOperatorConfig.fromMap(Collections.emptyMap());
109+
ClusterOperatorConfig config = ClusterOperatorConfig.fromMap(Collections.emptyMap());
110+
assertEquals(new HashSet<>(asList("*")), config.getNamespaces());
111111
}
112112

113113
@Test

Diff for: documentation/book/proc-deploying-cluster-operator-kubernetes-to-watch-whole-cluster.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
[id='deploying-cluster-operator-kubernetes-to-watch-whole-cluster-{context}']
77
= Deploying the Cluster Operator to watch all namespaces
88

9-
You can configure the Cluster Operator to watch {OpenShiftName} resources across all {Namespaces} in your {ProductPlatformName} cluster. When running in this mode, the Cluster Operator automatically manages clusters in any new projects or namespaces that are created.
9+
You can configure the Cluster Operator to watch {ProductName} resources across all {Namespaces} in your {ProductPlatformName} cluster. When running in this mode, the Cluster Operator automatically manages clusters in any new projects or namespaces that are created.
1010

1111
.Prerequisites
1212

Diff for: documentation/book/ref-operators-cluster-operator-configuration.adoc

+3-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@
77

88
The Cluster Operator can be configured through the following supported environment variables:
99

10-
`STRIMZI_NAMESPACE`:: Required. A comma-separated list of namespaces that the operator should
11-
operate in. The Cluster Operator deployment might use the link:https://kubernetes.io/docs/tasks/inject-data-application/downward-api-volume-expose-pod-information/#the-downward-api[{KubernetesName} Downward API^]
10+
`STRIMZI_NAMESPACE`:: A comma-separated list of {Namespaces} that the operator should operate in.
11+
When not set, set to empty string, or to `*` the cluster operator will operate in all {Namespaces}.
12+
The Cluster Operator deployment might use the link:https://kubernetes.io/docs/tasks/inject-data-application/downward-api-volume-expose-pod-information/#the-downward-api[{KubernetesName} Downward API^]
1213
to set this automatically to the namespace the Cluster Operator is deployed in. See the example below:
1314
+
1415
[source,yaml,options="nowrap"]

Diff for: olm/strimzi-cluster-operator.clusterserviceversion.yaml

+32-24
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)