Pour tout problème contactez-nous par mail : support@froggit.fr | La FAQ :grey_question: | Rejoignez-nous sur le Chat :speech_balloon:

Skip to content
Snippets Groups Projects
Commit 9c5aa7b1 authored by Idriss's avatar Idriss
Browse files

Add kubeconfigs template

parent 5ebc8186
No related branches found
No related tags found
No related merge requests found
......@@ -8,6 +8,7 @@ code_force_recreate: true
code_force_rebuild: true
coder_password: changeit
coder_git_email: changeit@changeit.com
kube_config_dir: /home/coder/.kube
code_git_workspaces:
- name: code-server
......@@ -36,3 +37,9 @@ ssh_private_keys_b64: []
## - user: <email user>
## value: value_base64_encoded
gpg_keys_b64: []
## kube_configs_b64:
## - filename: <file name>
## value: value_base64_encoded
## current_ctx: true|false (make a symlink to .kube/config file)
kube_configs_b64: []
......@@ -27,6 +27,17 @@ RUN echo "{{ key.value }}" | base64 -d > "{{ key.user }}.key" && \
{% endfor %}
RUN mkdir -p "{{ kube_config_dir }}"
{% for kubeconfig in kube_configs_b64 %}
RUN echo "{{ kubeconfig.value }}" | base64 -d > "{{ kube_config_dir }}/{{ kubeconfig.filename }}"
{% if kubeconfig.current_ctx is defined and kubeconfig.current_ctx %}
RUN ln -s "{{ kube_config_dir }}/{{ kubeconfig.filename }}" "{{ kube_config_dir }}/config"
{% endif %}
{% endfor %}
{% for registry in oci_registries %}
RUN echo "{{ registry.password }}" | docker login -u "{{ registry.login }}" "{{ registry.url }}" --password-stdin
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment