-
Notifications
You must be signed in to change notification settings - Fork 385
Conversation
templates/server-acl-init-job.yaml
Outdated
{{- end }} | ||
{{- if (and .Values.global.acls.replicationToken.secretName .Values.global.acls.replicationToken.secretKey) }} | ||
-enable-acl-replication=true \ | ||
-datacenter={{ .Values.global.datacenter }} \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This flag is only needed if we're in replication mode. I put it here to make the helm chart backwards compatible with older versions of consul-k8s that don't have this flag. For single-dc users, this flag isn't needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Luke, this looks good. A couple of thoughts:
- The datacenter flag could be retrieved from the server by the ACL bootstrapping job itself. This is optional though and definitely should not block the merge.
- When it comes to using the replication token to determine if this is the secondary datacenter, I like it. I personally have a bias towards having less configuration options.
- Right now the
bootstrapACLs
and theacl.*
properties don't interact. I know you've mentioned that this is something you're thinking to change in the future PR, but I thought it's worth noting it here so we don't forget.
Updated to remove |
Oh, also changed to use the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! I've tested this PR in combination with hashicorp/consul-k8s#226; everything worked great!
Suport creating an ACL replication token (for primary dcs) and referencing a pre-created ACL replication token (for secondary dcs).
Support creating an ACL replication token (for primary dcs) via
global.acls.createReplicationToken
andreferencing a pre-created ACL replication token (for secondary dcs) via
global.acls.replicationToken
.One thing to review here is that we're using the existence of
global.acls.replicationToken
to determine whether we set other config flags that are required for replication. We could have had a separate setting, e.g.global.acls.enableReplication
.