infrastructure/k8s/roles/coder/tasks/main.yml

39 lines
987 B
YAML
Raw Normal View History

2023-06-13 17:21:23 +00:00
---
- name: Create Coder namespace
kubernetes.core.k8s:
name: coder
api_version: v1
kind: Namespace
state: present
definition:
metadata:
labels:
prometheus: default
- name: Create Coder secret
kubernetes.core.k8s:
state: present
definition:
apiVersion: v1
kind: Secret
metadata:
name: coder-secrets
namespace: coder
data:
DB_URL: "{{ coder.db.url | b64encode }}"
OIDC_CLIENT_ID: "{{ coder.auth.clientId | b64encode }}"
OIDC_CLIENT_SECRET: "{{ coder.auth.clientSecret | b64encode }}"
- name: Add Coder chart repo
kubernetes.core.helm_repository:
name: coderv2
repo_url: https://helm.coder.com/v2
- name: Deploy Coder chart
kubernetes.core.helm:
name: coder
chart_ref: coderv2/coder
release_namespace: coder
2023-10-10 18:02:32 +00:00
chart_version: 2.2.1
2023-06-13 17:21:23 +00:00
update_repo_cache: true
release_values: "{{ lookup('template', 'values.coder.yml.j2') | from_yaml }}"