Skip to content

Commit 3235ab8

Browse files
(DOCSP-9541), (DOCSP-9518): Operator: validate the AppDB configuratio… (#223)
* (DOCSP-9541), (DOCSP-9518): Operator: validate the AppDB configuration and Changes to webhook section * (DOCSP-9541): copy review feedback * (DOCSP-9541), (DOCSP-9518): tech review feedback
1 parent fa15bee commit 3235ab8

File tree

2 files changed

+23
-24
lines changed

2 files changed

+23
-24
lines changed

source/reference/k8s-operator-om-specification.txt

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -133,15 +133,6 @@ Optional |onprem| Resource Settings
133133
- ``spec.applicationDatabase.podSpec.``:setting:`~spec.podSpec.nodeAffinity`
134134
- :opsmgrkube:`spec.applicationDatabase.version`
135135

136-
Do not use the following settings from the
137-
:ref:`replica set <replica-set-settings>` resource specification:
138-
139-
- :setting:`spec.additionalMongodConfig.net.ssl.mode`
140-
- :setting:`spec.security.authentication.internalCluster`
141-
- :setting:`spec.security.tls.enabled`
142-
- :setting:`spec.opsManager.configMapRef.name`
143-
- :setting:`spec.credentials`
144-
145136
.. opsmgrkube:: spec.applicationDatabase.passwordSecretKeyRef.name
146137

147138
*Type*: string

source/tutorial/plan-k8s-operator-install.txt

Lines changed: 23 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -67,26 +67,34 @@ Validation Webhook
6767
~~~~~~~~~~~~~~~~~~
6868

6969
The |k8s-op-short| uses a webhook to prevent users from applying invalid
70-
resource definitions. The webhook rejects creating and updating replica
71-
sets in the following scenarios:
72-
73-
- :setting:`spec.connectivity.replicaSetHorizons` is set, but
74-
:setting:`spec.security.tls.enabled` is ``false`` or not set
75-
- :setting:`spec.connectivity.replicaSetHorizons` has a number of
76-
horizons configured that is not equal to the number of members set in
77-
:setting:`spec.members`
78-
79-
The webhook rejects these requests immediately and the |k8s-op-short|
80-
doesn't create or update the resource.
70+
resource definitions. The webhook rejects these requests immediately and
71+
the |k8s-op-short| doesn't create or update the resource.
8172

8273
The ``ClusterRole`` and ``ClusterRoleBinding`` for the webhook are
8374
included in the default configuration files that you apply during
8475
installation. To create the role and binding, you must have
8576
:k8sdocs:`cluster-admin privileges
86-
</reference/access-authn-authz/rbac/#user-facing-roles>` . If you have
87-
insufficient privileges or if you choose to remove the role and binding
88-
from the default configuration, the |k8s-op-short| produces error logs
89-
and continues to function normally, but without validation rejections.
77+
</reference/access-authn-authz/rbac/#user-facing-roles>`.
78+
79+
If you apply an invalid resource definition, the webhook returns
80+
a message that describes the error to the shell:
81+
82+
.. code-block:: none
83+
84+
Error from server (shardPodSpec field is not configurable for
85+
application databases as it is for sharded clusters and appdbs are
86+
replica sets): error when creating "my-ops-manager.yaml":
87+
admission webhook "ompolicy.mongodb.com" denied the request:
88+
shardPodSpec field is not configurable for application databases as
89+
it is for sharded clusters and appdbs are replica sets
90+
91+
The validation webhook is not required to create or update resources. If
92+
you omit the validation webhook, remove its role and binding from the
93+
default configuration, or have insufficient privileges to run it, the
94+
|k8s-op-short| performs the same validations when it reconciles each
95+
resource. The |k8s-op-short| marks resources as ``Failed`` if validation
96+
encounters a critical error. For non-critical errors, the |k8s-op-short|
97+
issues warnings.
9098

9199
.. _k8s-deployment-scopes:
92100

0 commit comments

Comments
 (0)