k8s: add registry-cred VSS + imagePullSecrets after prereq check
Prereqs verified on the cluster: VSO 1.3.0 (transformation supported, openbao-kubernetes VaultAuth healthy), MQTT egress to 10.5.30.3:1883 reachable from a pod, target nodes untainted, registry requires auth. Add registry-cred-vaultstaticsecret.yaml (secret/registry/nexus -> dockerconfigjson, mirroring existing cluster pattern) and wire imagePullSecrets into the DaemonSet. README updated with verified prereqs + apply order.
This commit is contained in:
@@ -16,31 +16,35 @@ independent, exactly like the standalone hosts.
|
|||||||
- No SAS poller (no SES enclosures on these nodes). Consequence: host-drive
|
- No SAS poller (no SES enclosures on these nodes). Consequence: host-drive
|
||||||
entities have no ZFS pool label (no zfs_map producer).
|
entities have no ZFS pool label (no zfs_map producer).
|
||||||
|
|
||||||
## Prereqs to verify before applying
|
## Prereqs — verified 2026-06-16
|
||||||
|
|
||||||
1. **Registry pull**: confirm the cluster can pull `docker.adamksmith.xyz/*`.
|
1. **Registry pull**: registry requires auth. `registry-cred-vaultstaticsecret.yaml`
|
||||||
If it needs auth, sync a `regcred` into the `jbod-monitor` namespace and
|
syncs `secret/registry/nexus` → `docker-registry-cred` (dockerconfigjson),
|
||||||
uncomment `imagePullSecrets` in `daemonset.yaml`.
|
referenced as `imagePullSecrets` in the DaemonSet. (Mirrors the cluster's
|
||||||
2. **VSO**: `vault-secrets-operator-system/openbao-kubernetes` VaultAuth exists
|
existing `*-registry-cred` pattern.)
|
||||||
(it does, per infra notes). Confirm the `transformation.templates` syntax
|
2. **VSO**: v1.3.0; `openbao-kubernetes` VaultAuth healthy; `transformation.templates`
|
||||||
matches the installed VSO version.
|
supported. No existing VSS in the cluster uses transformation, so watch the
|
||||||
3. **MQTT egress**: pods must reach `10.5.30.3:1883` (EMQX).
|
`jbod-mqtt` VSS status on first apply for template errors.
|
||||||
|
3. **MQTT egress**: confirmed — a cluster pod reached `10.5.30.3:1883`.
|
||||||
|
4. **Nodes**: pascal/currie/fermi are untainted → no tolerations needed.
|
||||||
|
|
||||||
## Apply order
|
## Apply order
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# 1. Label ONLY the intended nodes (do not blanket-label all workers):
|
# 1. Label ONLY the intended nodes (do not blanket-label all workers):
|
||||||
kubectl label node usco-dc-pascal usco-dc-currie usco-dc-fermi jbod-monitor=enabled
|
kubectl label node usco-dc-pascal usco-dc-currie usco-dc-fermi jbod-monitor=enabled
|
||||||
|
# (canary: label just usco-dc-fermi first)
|
||||||
|
|
||||||
# 2. Namespace + DaemonSet:
|
# 2. Namespace + DaemonSet:
|
||||||
kubectl apply -f k8s/daemonset.yaml
|
kubectl apply -f k8s/daemonset.yaml
|
||||||
|
|
||||||
# 3. MQTT creds (VSO → Secret jbod-mqtt). Apply, then confirm it synced:
|
# 3. Secrets (VSO → docker-registry-cred + jbod-mqtt). Apply, then confirm sync:
|
||||||
|
kubectl apply -f k8s/registry-cred-vaultstaticsecret.yaml
|
||||||
kubectl apply -f k8s/mqtt-vaultstaticsecret.yaml
|
kubectl apply -f k8s/mqtt-vaultstaticsecret.yaml
|
||||||
kubectl -n jbod-monitor get vaultstaticsecret jbod-mqtt # SYNCED=True
|
kubectl -n jbod-monitor get vaultstaticsecret # SYNCED=True for both
|
||||||
kubectl -n jbod-monitor get secret jbod-mqtt # has MQTT_USERNAME/PASSWORD
|
kubectl -n jbod-monitor get secret jbod-mqtt -o jsonpath='{.data.MQTT_USERNAME}' | base64 -d
|
||||||
|
|
||||||
# 4. Roll the web container so it picks up the secret (if it started first):
|
# 4. Roll the DaemonSet so pods pick up the secrets if they raced ahead:
|
||||||
kubectl -n jbod-monitor rollout restart daemonset/jbod-monitor
|
kubectl -n jbod-monitor rollout restart daemonset/jbod-monitor
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -35,9 +35,8 @@ spec:
|
|||||||
# Only nodes explicitly opted in (see README: kubectl label node ...).
|
# Only nodes explicitly opted in (see README: kubectl label node ...).
|
||||||
nodeSelector:
|
nodeSelector:
|
||||||
jbod-monitor: "enabled"
|
jbod-monitor: "enabled"
|
||||||
# If the registry needs auth, sync a regcred and uncomment:
|
imagePullSecrets:
|
||||||
# imagePullSecrets:
|
- name: docker-registry-cred # synced by registry-cred-vaultstaticsecret.yaml
|
||||||
# - name: regcred
|
|
||||||
containers:
|
containers:
|
||||||
- name: redis
|
- name: redis
|
||||||
image: redis:7-alpine
|
image: redis:7-alpine
|
||||||
|
|||||||
18
k8s/registry-cred-vaultstaticsecret.yaml
Normal file
18
k8s/registry-cred-vaultstaticsecret.yaml
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
# Image pull secret for docker.adamksmith.xyz, synced by VSO from OpenBao.
|
||||||
|
# Mirrors the cluster's existing *-registry-cred pattern (secret/registry/nexus
|
||||||
|
# -> dockerconfigjson). Referenced as imagePullSecrets in the DaemonSet.
|
||||||
|
apiVersion: secrets.hashicorp.com/v1beta1
|
||||||
|
kind: VaultStaticSecret
|
||||||
|
metadata:
|
||||||
|
name: docker-registry-cred
|
||||||
|
namespace: jbod-monitor
|
||||||
|
spec:
|
||||||
|
vaultAuthRef: vault-secrets-operator-system/openbao-kubernetes
|
||||||
|
mount: secret
|
||||||
|
path: registry/nexus
|
||||||
|
type: kv-v2
|
||||||
|
refreshAfter: 1h
|
||||||
|
destination:
|
||||||
|
name: docker-registry-cred
|
||||||
|
create: true
|
||||||
|
type: kubernetes.io/dockerconfigjson
|
||||||
Reference in New Issue
Block a user