You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// if the zookeeperRef has ACLs set, verify the env vars were set correctly for this initContainer
325
328
allACL, _:=solrCloud.Spec.ZookeeperRef.GetACLs()
326
329
ifallACL!=nil {
327
-
g.Expect(expInitContainer.Env).To(HaveLen(10), "Wrong number of env vars using ACLs and Basic Auth")
328
-
g.Expect(expInitContainer.Env[len(expInitContainer.Env)-2].Name).To(Equal("SOLR_OPTS"), "Env var SOLR_OPTS is misplaced the Solr Pod env vars")
329
-
g.Expect(expInitContainer.Env[len(expInitContainer.Env)-1].Name).To(Equal("SECURITY_JSON"), "Env var SECURITY_JSON is misplaced the Solr Pod env vars")
g.Expect(expInitContainer.Env).To(HaveLen(11), "Wrong number of env vars using ACLs and Basic Auth")
331
+
g.Expect(expInitContainer.Env[len(expInitContainer.Env)-3].Name).To(Equal("SOLR_OPTS"), "Env var SOLR_OPTS is misplaced the Solr Pod env vars")
332
+
g.Expect(expInitContainer.Env[len(expInitContainer.Env)-2].Name).To(Equal("SECURITY_JSON"), "Env var SECURITY_JSON is misplaced the Solr Pod env vars")
333
+
g.Expect(expInitContainer.Env[len(expInitContainer.Env)-1].Name).To(Equal("SECURITY_JSON_OVERWRITE"), "Env var SECURITY_JSON_OVERWRITE is misplaced the Solr Pod env vars")
" echo 'Blank security.json found. Put new security.json in ZK'; "+
247
-
"fi; "+// TODO: Consider checking a diff and still applying over the top
252
+
"elif [ \"${SECURITY_JSON_OVERWRITE}\" = true ] && [ \"$(cat /tmp/current_security.json)\" != \"$(echo $SECURITY_JSON)\" ]; then "+// We want to overwrite the security config if there's a diff
Copy file name to clipboardexpand all lines: docs/solr-cloud/solr-cloud-crd.md
+3
Original file line number
Diff line number
Diff line change
@@ -1126,9 +1126,12 @@ spec:
1126
1126
bootstrapSecurityJson:
1127
1127
name: my-custom-security-json
1128
1128
key: security.json
1129
+
overwrite: false
1129
1130
```
1130
1131
For `Basic` authentication, if you don't supply a `security.json` Secret, then the operator assumes you are bootstrapping the security configuration via some other means.
1131
1132
1133
+
If `overwrite` is set to `true`, the security.json for the cluster will be updated if there is a difference between the underlying secret and the security.json in ZK.
1134
+
1132
1135
Refer to the example `security.json` shown in the Authorization section above to help you get started crafting your own custom configuration.
0 commit comments