Skip to content

Pass kubectl options to shared secret Jobs

Hossein Pursultani requested to merge 3201-kubectl-opts into master

What does this MR do?

Allows passing kubectl command-line options to shared secret Jobs via shared-secrets.kubectl.options Chart value. This value is passed as KUBECTL_OPTS to shared secret containers, where the scripts use it as additional command-line options.

Note that this only works for generic command line options. See: https://kubernetes.io/docs/reference/kubectl/kubectl/#options

By default, the GitLab Chart uses --cache-dir /tmp/.kube/cache to ensure when kubectl is run as nobody user it can create a cache directory. This will help to alleviate problems similar to #3201 (closed) where shared secret Jobs slow down.

Related issues

Closes #3201 (closed)

Checklist

See Definition of done.

For anything in this list which will not be completed, please provide a reason in the MR discussion.

Required

  • Merge Request Title and Description are up to date, accurate, and descriptive
  • MR targeting the appropriate branch
  • MR has a green pipeline on GitLab.com

Expected (please provide an explanation if not completing)

  • Test plan indicating conditions for success has been posted and passes
  • Documentation created/updated
  • Tests added
  • Integration tests added to GitLab QA
  • Equivalent MR/issue for omnibus-gitlab opened
Edited by Hossein Pursultani

Merge request reports