Compare commits

..

4 Commits

31 changed files with 1 additions and 524 deletions
-58
View File
@@ -1,58 +0,0 @@
name: Validate Manifests
on:
pull_request:
branches: [main]
jobs:
validate:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install kubeconform
run: |
curl -sL https://github.com/yannh/kubeconform/releases/download/v0.6.7/kubeconform-linux-amd64.tar.gz \
| tar xz -C /usr/local/bin
chmod +x /usr/local/bin/kubeconform
- name: Schema validation (kubeconform)
run: |
find . -name '*.yaml' -o -name '*.yml' \
| grep -v '\.gitea/' \
| sort \
| xargs kubeconform \
-strict \
-ignore-missing-schemas \
-kubernetes-version 1.30.0 \
-summary
- name: Install kubectl
run: |
K8S_VER=$(curl -sL https://dl.k8s.io/release/stable.txt)
curl -sLO "https://dl.k8s.io/release/${K8S_VER}/bin/linux/amd64/kubectl"
chmod +x kubectl && mv kubectl /usr/local/bin/kubectl
- name: Server-side dry-run (CRD existence check)
env:
KUBECONFIG_DATA: ${{ secrets.KUBECONFIG }}
run: |
echo "$KUBECONFIG_DATA" | base64 -d > /tmp/kube.yaml
# Apply all YAML files in sorted order — server-side dry-run rejects
# any apiVersion/Kind whose CRD is not installed in the cluster.
find . -name '*.yaml' -o -name '*.yml' \
| grep -v '\.gitea/' \
| sort \
| xargs -I{} kubectl apply \
--dry-run=server \
--kubeconfig /tmp/kube.yaml \
-f {} 2>&1 \
| tee /tmp/dryrun.log
rm -f /tmp/kube.yaml
# Fail if any "no kind is registered" or "no matches for kind" errors
if grep -qE "no kind is registered|no matches for kind|unknown field" /tmp/dryrun.log; then
echo "❌ Dry-run found unknown resources or fields — manifests reference CRDs not installed in the cluster"
exit 1
fi
echo "✅ All manifests passed server-side dry-run"
+1 -1
View File
@@ -1,3 +1,3 @@
# talos-cluster
Managed by [ORION](https://github.com/richard-callis/orion-web). Do not edit manually — changes are proposed via PR.
ORION-managed cluster: Talos Cluster
@@ -1,45 +0,0 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: tailscale-operator
namespace: tailscale
labels:
app: tailscale-operator
spec:
replicas: 1
selector:
matchLabels:
app: tailscale-operator
template:
metadata:
labels:
app: tailscale-operator
spec:
serviceAccountName: tailscale-operator
containers:
- name: operator
image: ghcr.io/tailscale/k8s-operator:v1.78.0
env:
- name: TS_AUTHKEY
valueFrom:
secretKeyRef:
name: tailscale-auth
key: TS_AUTH_KEY
- name: DEPLOYMENT_TYPE
value: "k8s"
ports:
- containerPort: 8080
name: http-metrics
readinessProbe:
httpGet:
path: /metrics
port: http-metrics
initialDelaySeconds: 10
periodSeconds: 15
resources:
requests:
cpu: 50m
memory: 64Mi
limits:
cpu: 200m
memory: 256Mi
@@ -1,49 +0,0 @@
apiVersion: v1
kind: Namespace
metadata:
name: tailscale
labels:
app.kubernetes.io/name: tailscale-operator
app.kubernetes.io/part-of: infrastructure
management: gitops
managed-by: orion
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: tailscale-operator
namespace: tailscale
labels:
app.kubernetes.io/name: tailscale-operator
app.kubernetes.io/part-of: infrastructure
management: gitops
managed-by: orion
spec:
replicas: 1
selector:
matchLabels:
app.kubernetes.io/name: tailscale-operator
template:
metadata:
labels:
app.kubernetes.io/name: tailscale-operator
spec:
serviceAccountName: tailscale-operator
containers:
- name: operator
image: ghcr.io/tailscale/k8s-operator:1.78.1
env:
- name: TS_AUTH_KEY
valueFrom:
secretKeyRef:
name: tailscale-auth
key: TS_AUTH_KEY
- name: TS_USERSPACE
value: "true"
resources:
requests:
cpu: 50m
memory: 64Mi
limits:
cpu: 100m
memory: 128Mi
-33
View File
@@ -1,33 +0,0 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: tailscale-operator
namespace: tailscale
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: tailscale-operator
rules:
- apiGroups: [""]
resources: ["secrets", "services", "endpoints", "namespaces", "nodes"]
verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]
- apiGroups: ["apps"]
resources: ["deployments", "statefulsets", "daemonsets"]
verbs: ["get", "list", "watch", "update", "patch"]
- apiGroups: ["tailscale.com"]
resources: ["*"]
verbs: ["*"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: tailscale-operator
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: tailscale-operator
subjects:
- kind: ServiceAccount
name: tailscale-operator
namespace: tailscale
@@ -1,14 +0,0 @@
apiVersion: external-secrets.io/v1
kind: ClusterSecretStore
metadata:
name: orion-vault
namespace: vault
spec:
provider:
vault:
server: "http://vault.vault.svc.cluster.local:8200"
path: "secret"
auth:
agentAuth:
path: "kubernetes"
namespace: "vault"
-19
View File
@@ -1,19 +0,0 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: tailscale-operator
labels:
app: tailscale-operator
rules:
- apiGroups: [""]
resources: ["pods", "services", "secrets", "configmaps"]
verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]
- apiGroups: ["apps"]
resources: ["deployments", "statefulsets"]
verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]
- apiGroups: ["discovery.k8s.io"]
resources: ["endpointslices"]
verbs: ["get", "list", "watch"]
- apiGroups: ["coordination.k8s.io"]
resources: ["leases"]
verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]
@@ -1,14 +0,0 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: tailscale-operator
labels:
app: tailscale-operator
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: tailscale-operator
subjects:
- kind: ServiceAccount
name: tailscale-operator
namespace: apps
-9
View File
@@ -1,9 +0,0 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: tailscale-operator
namespace: apps
labels:
app: tailscale-operator
data:
TS_KUBE_OBJECT_STORE: "true"
-42
View File
@@ -1,42 +0,0 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: tailscale-operator
namespace: apps
labels:
app: tailscale-operator
spec:
replicas: 1
selector:
matchLabels:
app: tailscale-operator
template:
metadata:
labels:
app: tailscale-operator
spec:
serviceAccountName: tailscale-operator
containers:
- name: operator
image: ghcr.io/tailscale/k8s-operator:1.72.0
env:
- name: TS_AUTH_KEY
valueFrom:
secretKeyRef:
name: tailscale-auth
key: TS_AUTH_KEY
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: POD_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
resources:
requests:
cpu: 50m
memory: 64Mi
limits:
cpu: 100m
memory: 128Mi
@@ -1,18 +0,0 @@
apiVersion: external-secrets.io/v1
kind: ExternalSecret
metadata:
name: tailscale-auth
namespace: tailscale
spec:
refreshInterval: 1h
secretStoreRef:
name: orion-vault
kind: ClusterSecretStore
target:
name: tailscale-auth
creationPolicy: Owner
data:
- secretKey: TS_AUTH_KEY
remoteRef:
key: tailscale
property: TS_AUTH_KEY
-6
View File
@@ -1,6 +0,0 @@
apiVersion: v1
kind: Namespace
metadata:
name: apps
labels:
name: apps
@@ -1,17 +0,0 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: tailscale-operator
rules:
- apiGroups: [""]
resources: ["secrets", "configmaps", "services", "pods", "endpoints"]
verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]
- apiGroups: ["apps"]
resources: ["deployments", "statefulsets", "daemonsets"]
verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]
- apiGroups: ["networking.k8s.io"]
resources: ["ingresses"]
verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]
- apiGroups: ["tailscale.com"]
resources: ["*"]
verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]
@@ -1,12 +0,0 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: tailscale-operator
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: tailscale-operator
subjects:
- kind: ServiceAccount
name: tailscale-operator
namespace: tailscale
@@ -1,35 +0,0 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: tailscale-operator
namespace: tailscale
labels:
app: tailscale-operator
spec:
replicas: 1
selector:
matchLabels:
app: tailscale-operator
template:
metadata:
labels:
app: tailscale-operator
spec:
serviceAccountName: tailscale-operator
containers:
- name: operator
image: ghcr.io/tailscale/k8s-operator:v1.78.3
env:
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: POD_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: TS_AUTH_KEY
valueFrom:
secretKeyRef:
name: tailscale-auth
key: TS_AUTH_KEY
@@ -1,7 +0,0 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: tailscale-operator
namespace: tailscale
labels:
app: tailscale-operator
@@ -1,7 +0,0 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: tailscale-operator
namespace: apps
labels:
app: tailscale-operator
-12
View File
@@ -1,12 +0,0 @@
apiVersion: v1
kind: Secret
metadata:
name: tailscale-operator-secret
namespace: tailscale
labels:
app.kubernetes.io/name: tailscale
app.kubernetes.io/component: operator
type: Opaque
data:
# TODO: Fill in the Tailscale auth key (base64 encoded)
authkey: PLACEHOLDER
-35
View File
@@ -1,35 +0,0 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: tailscale-operator
namespace: tailscale
labels:
app: tailscale-operator
spec:
replicas: 1
selector:
matchLabels:
app: tailscale-operator
template:
metadata:
labels:
app: tailscale-operator
spec:
serviceAccountName: tailscale-operator
containers:
- name: operator
image: ghcr.io/tailscale/k8s-operator:v1.78.3
env:
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: POD_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: TS_AUTH_KEY
valueFrom:
secretKeyRef:
key: TS_AUTH_KEY
name: tailscale-auth
@@ -1,18 +0,0 @@
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: tailscale-auth
namespace: tailscale
spec:
refreshInterval: 1h
secretStoreRef:
name: orion-vault
kind: ClusterSecretStore
target:
name: tailscale-auth
creationPolicy: Owner
data:
- secretKey: TS_AUTH_KEY
remoteRef:
key: secret/tailscale
property: TS_AUTH_KEY
-7
View File
@@ -1,7 +0,0 @@
apiVersion: v1
kind: Namespace
metadata:
name: tailscale
labels:
app.kubernetes.io/name: tailscale
app.kubernetes.io/component: operator
-48
View File
@@ -1,48 +0,0 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: tailscale-operator
namespace: tailscale
labels:
app.kubernetes.io/name: tailscale
app.kubernetes.io/component: operator
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: tailscale-operator
labels:
app.kubernetes.io/name: tailscale
app.kubernetes.io/component: operator
rules:
- apiGroups: ['']
resources: ['secrets', 'services', 'endpoints']
verbs: ['get', 'list', 'watch', 'create', 'update', 'patch', 'delete']
- apiGroups: ['']
resources: ['nodes']
verbs: ['get', 'list', 'update', 'patch']
- apiGroups: ['apps']
resources: ['daemonsets']
verbs: ['get', 'list', 'watch']
- apiGroups: ['tailscale.com']
resources: ['*']
verbs: ['get', 'list', 'watch', 'create', 'update', 'patch', 'delete']
- apiGroups: ['coordination.k8s.io']
resources: ['leases']
verbs: ['get', 'create', 'update']
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: tailscale-operator
labels:
app.kubernetes.io/name: tailscale
app.kubernetes.io/component: operator
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: tailscale-operator
subjects:
- kind: ServiceAccount
name: tailscale-operator
namespace: tailscale
-18
View File
@@ -1,18 +0,0 @@
apiVersion: v1
kind: Service
metadata:
name: tailscale-operator
namespace: tailscale
labels:
app.kubernetes.io/name: tailscale
app.kubernetes.io/component: operator
spec:
type: ClusterIP
ports:
- name: metrics
port: 8080
targetPort: 8080
protocol: TCP
selector:
app.kubernetes.io/name: tailscale
app.kubernetes.io/component: operator