Skip to content

Commit 719a77a

Browse files
author
Robin Lenz
committed
Add install_cuby role with ProcessCube marketplace secrets
- Add processcube_api_key terraform variable - Create install_cuby ansible role that sets up: - processcube namespace - regcred ImagePull secret for marketplace.processcube.io - processcube-api-key secret with the API key
1 parent 0b374c3 commit 719a77a

File tree

6 files changed

+49
-0
lines changed

6 files changed

+49
-0
lines changed

hetzner-setup/ProcessCube.Cloud/ansible/inventory/hosts.tpl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,5 @@ tailscale_tags=${tailscale_tags}
2828
%{ if onepassword_credentials_json != "" ~}
2929
onepassword_credentials_json=${onepassword_credentials_json}
3030
%{ endif ~}
31+
processcube_api_key=${processcube_api_key}
3132
ansible_python_interpreter=/usr/bin/python3
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
- name: Create processcube namespace
3+
shell: kubectl create namespace processcube --dry-run=client -o yaml | kubectl apply -f -
4+
changed_when: true
5+
6+
- name: Create ProcessCube Marketplace ImagePull Secret
7+
shell: |
8+
kubectl create secret docker-registry regcred \
9+
--docker-server=https://marketplace.processcube.io \
10+
--docker-username=processcube \
11+
--docker-password="{{ processcube_api_key }}" \
12+
-n processcube \
13+
--dry-run=client -o yaml | kubectl apply -f -
14+
changed_when: true
15+
16+
- name: Create ProcessCube API Key Secret
17+
shell: |
18+
kubectl create secret generic processcube-api-key \
19+
--from-literal=api-key="{{ processcube_api_key }}" \
20+
-n processcube \
21+
--dry-run=client -o yaml | kubectl apply -f -
22+
changed_when: true
23+
24+
- name: Display ProcessCube setup info
25+
debug:
26+
msg:
27+
- "ProcessCube secrets created in namespace 'processcube'"
28+
- ""
29+
- "Available secrets:"
30+
- " - regcred (ImagePull Secret)"
31+
- " - processcube-api-key (API Key Secret)"

hetzner-setup/ProcessCube.Cloud/ansible/site.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,13 @@
8989
roles:
9090
- argocd
9191

92+
- name: Install Cuby
93+
hosts: k3s_master
94+
gather_facts: no
95+
become: yes
96+
roles:
97+
- install_cuby
98+
9299
- name: Verify Cluster
93100
hosts: k3s_master
94101
gather_facts: no

hetzner-setup/ProcessCube.Cloud/main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,7 @@ resource "local_file" "ansible_inventory" {
200200
tailscale_auth_key = var.tailscale_auth_key
201201
tailscale_tags = var.tailscale_tags
202202
onepassword_credentials_json = var.onepassword_credentials_json
203+
processcube_api_key = var.processcube_api_key
203204
})
204205
filename = "${path.module}/ansible/inventory/hosts"
205206

hetzner-setup/ProcessCube.Cloud/terraform.tfvars.example

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,6 @@ tailscale_auth_key = "YOUR_TAILSCALE_AUTH_KEY_HERE"
2828
# onepassword_credentials_json = "/path/to/1password-credentials.json"
2929
# Note: External Secrets Operator will only be installed if this is set
3030
# Note: onepassword-connect-token must be created per application namespace
31+
32+
# ProcessCube Marketplace Configuration
33+
processcube_api_key = "YOUR_PROCESSCUBE_API_KEY_HERE"

hetzner-setup/ProcessCube.Cloud/variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,3 +91,9 @@ variable "onepassword_credentials_json" {
9191
sensitive = true
9292
default = ""
9393
}
94+
95+
variable "processcube_api_key" {
96+
description = "ProcessCube API key for marketplace.processcube.io image registry"
97+
type = string
98+
sensitive = true
99+
}

0 commit comments

Comments
 (0)