Skip to content

Commit fcebdcf

Browse files
committed
crds 🤦
Signed-off-by: Lukas Kral <lukywill16@gmail.com>
1 parent 3db190c commit fcebdcf

2 files changed

Lines changed: 30 additions & 0 deletions

File tree

packaging/helm-charts/helm3/strimzi-kafka-operator/crds/044-Crd-kafkauser.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,16 +81,31 @@ spec:
8181
required:
8282
- valueFrom
8383
description: "Specify the password for the user. If not set, a new password is generated by the User Operator."
84+
renewalDays:
85+
type: integer
86+
description: "Configures how many days before the certificate expiration should be the user certificate renewed. If not configured, default User Operator value is used."
87+
x-kubernetes-validations:
88+
- rule: self > 0
89+
message: '''renewalDays'' has to be higher than 0.'
8490
type:
8591
type: string
8692
enum:
8793
- tls
8894
- tls-external
8995
- scram-sha-512
9096
description: Authentication type.
97+
validityDays:
98+
type: integer
99+
description: "Number of days for which the user certificate should be valid. If not configured, default User Operator value is used."
100+
x-kubernetes-validations:
101+
- rule: self > 0
102+
message: '''validityDays'' has to be higher than 0.'
91103
required:
92104
- type
93105
description: "Authentication mechanism enabled for this Kafka user. The supported authentication mechanisms are `scram-sha-512`, `tls`, and `tls-external`. \n\n* `scram-sha-512` generates a secret with SASL SCRAM-SHA-512 credentials.\n* `tls` generates a secret with user certificate for mutual TLS authentication.\n* `tls-external` does not generate a user certificate. But prepares the user for using mutual TLS authentication using a user certificate generated outside the User Operator.\n ACLs and quotas set for this user are configured in the `CN=<username>` format.\n\nAuthentication is optional. If authentication is not configured, no credentials are generated. ACLs and quotas set for the user are configured in the `<username>` format suitable for SASL authentication."
106+
x-kubernetes-validations:
107+
- rule: self.type == 'tls' || (!has(self.validityDays) && !has(self.renewalDays))
108+
message: "'validityDays' and 'renewalDays' can be configured only with 'type: tls'"
94109
authorization:
95110
type: object
96111
properties:

packaging/install/user-operator/04-Crd-kafkauser.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,16 +80,31 @@ spec:
8080
required:
8181
- valueFrom
8282
description: "Specify the password for the user. If not set, a new password is generated by the User Operator."
83+
renewalDays:
84+
type: integer
85+
description: "Configures how many days before the certificate expiration should be the user certificate renewed. If not configured, default User Operator value is used."
86+
x-kubernetes-validations:
87+
- rule: self > 0
88+
message: '''renewalDays'' has to be higher than 0.'
8389
type:
8490
type: string
8591
enum:
8692
- tls
8793
- tls-external
8894
- scram-sha-512
8995
description: Authentication type.
96+
validityDays:
97+
type: integer
98+
description: "Number of days for which the user certificate should be valid. If not configured, default User Operator value is used."
99+
x-kubernetes-validations:
100+
- rule: self > 0
101+
message: '''validityDays'' has to be higher than 0.'
90102
required:
91103
- type
92104
description: "Authentication mechanism enabled for this Kafka user. The supported authentication mechanisms are `scram-sha-512`, `tls`, and `tls-external`. \n\n* `scram-sha-512` generates a secret with SASL SCRAM-SHA-512 credentials.\n* `tls` generates a secret with user certificate for mutual TLS authentication.\n* `tls-external` does not generate a user certificate. But prepares the user for using mutual TLS authentication using a user certificate generated outside the User Operator.\n ACLs and quotas set for this user are configured in the `CN=<username>` format.\n\nAuthentication is optional. If authentication is not configured, no credentials are generated. ACLs and quotas set for the user are configured in the `<username>` format suitable for SASL authentication."
105+
x-kubernetes-validations:
106+
- rule: self.type == 'tls' || (!has(self.validityDays) && !has(self.renewalDays))
107+
message: "'validityDays' and 'renewalDays' can be configured only with 'type: tls'"
93108
authorization:
94109
type: object
95110
properties:

0 commit comments

Comments
 (0)