Skip to content

Commit 0b374c3

Browse files
author
Robin Lenz
committed
Make External Secrets Operator installation optional
Only install the External Secrets Operator with 1Password Connect when onepassword_credentials_json variable is set. Also fix hardcoded SSH key paths in outputs.tf.
1 parent ab7862d commit 0b374c3

File tree

5 files changed

+12
-7
lines changed

5 files changed

+12
-7
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,7 @@ letsencrypt_email=${letsencrypt_email}
2525
tailscale_auth_key=${tailscale_auth_key}
2626
tailscale_tags=${tailscale_tags}
2727
%{ endif ~}
28+
%{ if onepassword_credentials_json != "" ~}
2829
onepassword_credentials_json=${onepassword_credentials_json}
30+
%{ endif ~}
2931
ansible_python_interpreter=/usr/bin/python3

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,8 @@
7979
gather_facts: no
8080
become: yes
8181
roles:
82-
- external_secrets
82+
- role: external_secrets
83+
when: onepassword_credentials_json is defined and onepassword_credentials_json != ""
8384

8485
- name: Install ArgoCD
8586
hosts: k3s_master

hetzner-setup/ProcessCube.Cloud/outputs.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ output "k3s_token" {
2626

2727
output "kubeconfig_command" {
2828
description = "Command to get kubeconfig from master node"
29-
value = "ssh -i ~/.ssh/id_ed25519_tes root@${hcloud_server.k3s_master.ipv4_address} 'cat /etc/rancher/k3s/k3s.yaml' > kubeconfig.yaml"
29+
value = "ssh root@${hcloud_server.k3s_master.ipv4_address} 'cat /etc/rancher/k3s/k3s.yaml' > kubeconfig.yaml"
3030
}
3131

3232
output "network_id" {
@@ -47,7 +47,7 @@ output "load_balancer_info" {
4747
output "ssh_commands" {
4848
description = "SSH commands to access nodes"
4949
value = {
50-
master = "ssh -i ~/.ssh/id_ed25519_tes root@${hcloud_server.k3s_master.ipv4_address}"
51-
workers = [for worker in hcloud_server.k3s_worker : "ssh -i ~/.ssh/id_ed25519_tes root@${worker.ipv4_address}"]
50+
master = "ssh root@${hcloud_server.k3s_master.ipv4_address}"
51+
workers = [for worker in hcloud_server.k3s_worker : "ssh root@${worker.ipv4_address}"]
5252
}
5353
}

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ letsencrypt_email = "info@processcube.io"
2424
tailscale_auth_key = "YOUR_TAILSCALE_AUTH_KEY_HERE"
2525
# tailscale_tags = "tag:k3s" # Optional: Uncomment to use tags
2626

27-
# 1Password Connect Configuration for External Secrets Operator
28-
onepassword_credentials_json = "/path/to/1password-credentials.json"
27+
# 1Password Connect Configuration for External Secrets Operator (Optional)
28+
# onepassword_credentials_json = "/path/to/1password-credentials.json"
29+
# Note: External Secrets Operator will only be installed if this is set
2930
# Note: onepassword-connect-token must be created per application namespace

hetzner-setup/ProcessCube.Cloud/variables.tf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,8 @@ variable "tailscale_tags" {
8686
}
8787

8888
variable "onepassword_credentials_json" {
89-
description = "Path to 1Password Connect credentials JSON file"
89+
description = "Path to 1Password Connect credentials JSON file (optional - External Secrets Operator will only be installed if this is set)"
9090
type = string
9191
sensitive = true
92+
default = ""
9293
}

0 commit comments

Comments
 (0)