Skip to content
This repository was archived by the owner on Feb 22, 2022. It is now read-only.

[stable/keycloak] Add option to configure sidecars and misc improvements - #6090

Merged
k8s-ci-robot merged 3 commits into
helm:masterfrom
unguiculus:feature/keycloak
Jun 13, 2018
Merged

k8s-ci-robot merged 3 commits into
helm:masterfrom
unguiculus:feature/keycloak

Conversation

@unguiculus

@unguiculus unguiculus commented Jun 13, 2018 •

Copy link
Copy Markdown
Member
  • Allow configuring additional containers as sidecars, e. g. for
    a database proxy
  • Use tpl in various values
  • Configure Postgres-specifics only when Postgres is used
  • Miscellaneous minor fixes and improvements

@k8s-ci-robot
k8s-ci-robot requested review from foxish and prydonius June 13, 2018 09:17
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Jun 13, 2018
* Allow configuring additional containers as sidecars, e. g. for
  a database proxy
* Use `tpl` function for affinity and configure default anti-affinity
* Configure Postgres-specifics only when Postgres is used
* Miscellaneous minor fixes and improvements
@unguiculus

Copy link
Copy Markdown
Member Author

@ryandawsonuk

Copy link
Copy Markdown
Contributor

/lgtm

@k8s-ci-robot

Copy link
Copy Markdown
Contributor

@ryandawsonuk: changing LGTM is restricted to assignees, and only kubernetes/charts repo collaborators may be assigned issues.

Details

In response to this:

/lgtm

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@ryandawsonuk

ryandawsonuk commented Jun 13, 2018 •

Copy link
Copy Markdown
Contributor

@unguiculus This use of tpl is great! It will make it easier to include the keycloak chart as a requirement within another chart (much as the keycloak chart packages postgres). For loading a custom realm in particular, the toYaml approach just allows for referencing a secret with a fixed name. But with tpl I should be able to create a secret in parent chart like:

apiVersion: v1
kind: Secret
metadata:
  name: {{ template "mychart.fullname" . }}-realm-secret
  labels:
    heritage: {{ .Release.Service }}
    release: {{ .Release.Name }}
data:
{{ (.Files.Glob "files/realm.json").AsSecrets | indent 2 }}

And use that secret through the values.yaml for keycloak with:

  extraVolumes: |
    - name: realm-secret
      secret:
        secretName: {{ template "mychart.fullname" . }}-realm-secret
  extraVolumeMounts: |
    - name: realm-secret
      mountPath: "/realm/"
      readOnly: true

I just tried it out within the scope of the keycloak chart so should work when within a parent too.

@scottrigby scottrigby left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great 💯

Also linking to the #4283 master issue for charts sidecar pattern.

Let's try Prow commands inside a review:
/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Jun 13, 2018
@k8s-ci-robot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ryandawsonuk, scottrigby, unguiculus

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:
  • OWNERS [scottrigby,unguiculus]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot
k8s-ci-robot merged commit 8f5c342 into helm:master Jun 13, 2018
jainishshah17 added a commit to jainishshah17/charts that referenced this pull request Jun 14, 2018
* art-ha-static-volumes: (60 commits)
  added support for static pv
  [stable/artifactory] adding support for edge node and replicator (helm#5649)
  [stable/grafana] Set the user and fs group for grafana (helm#5854)
  [stable/stolon] Fix issue with secret deletion during helm upgrade (helm#5903)
  cert-manager: fast-forward to upstream 36289cf0 (helm#5919)
  Split Jenkins readiness and liveness probe periods (helm#5704)
  Kafka release name check (helm#5770)
  Adding JFrog Distribution (helm#5631)
  Correct default zookeeper host to be compatible with zk charts (helm#5824)
  [stable/redis] add RBAC (helm#5971)
  [stable/wordpress] Set dependencies to latest version (helm#6074)
  [stable/rabbitmq] Release 1.1.6 (helm#6095)
  [stable/mariadb] Fix configurable parameters (helm#6092)
  [stable/keycloak] Add option to configure sidecars and misc improvements (helm#6090)
  [stable/kubewatch] - Use maintained bitnami image for kubewatch (helm#5871)
  [stable/ghost] Release 4.0.1 (helm#6085)
  update PROCESSES.md to clarify promotion process (helm#6084)
  [incubator/drone] Move drone from incubator to stable (helm#5780)
  fix for helm#6039 (helm#6042)
  [stable/sonatype-nexus] Update image to 3.12.1 (helm#6076)
  ...
{{- with .Values.keycloak.password }}
password: {{ . | b64enc | quote }}
{{- if .Values.keycloak.password }}
password: {{ .Values.keycloak.password | b64enc | quote }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why did this get changed? i've usually seen with preferred over if

voron pushed a commit to dysnix/helm-charts that referenced this pull request Sep 5, 2018
…nts (helm#6090)

* [stable/keycloak] Add option to configure sidecars and misc improvements

* Allow configuring additional containers as sidecars, e. g. for
  a database proxy
* Use `tpl` function for affinity and configure default anti-affinity
* Configure Postgres-specifics only when Postgres is used
* Miscellaneous minor fixes and improvements

* Extend and document 'tpl' function usage

* Bump major version due to breaking changes

Signed-off-by: voron <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants