Compare commits
16 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d552a2b03a | |||
| f489715864 | |||
| 2a90fa8c53 | |||
| efb5abae5e | |||
| 72194bf59f | |||
| 7402e16cf4 | |||
| 6f560c8c68 | |||
| e29c00cae0 | |||
| 81481bf274 | |||
| e88ee7c408 | |||
| 47368da4e3 | |||
| a4db5a303d | |||
| 294fe564da | |||
| e39182ecbf | |||
| f881ff31dc | |||
| dddd39e385 |
@@ -0,0 +1,6 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: apps
|
||||
labels:
|
||||
name: apps
|
||||
@@ -1,55 +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:
|
||||
containers:
|
||||
- name: operator
|
||||
image: ghcr.io/tailscale/operator:latest
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
name: http-metrics
|
||||
protocol: TCP
|
||||
env:
|
||||
- name: TS_KUBE_NAMESPACE
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.namespace
|
||||
envFrom:
|
||||
- secretRef:
|
||||
name: tailscale-operator-secret
|
||||
volumeMounts:
|
||||
- name: oauth-config
|
||||
mountPath: /etc/tailscale/oauth
|
||||
readOnly: true
|
||||
volumes:
|
||||
- name: oauth-config
|
||||
secret:
|
||||
secretName: tailscale-operator-secret
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: tailscale-operator
|
||||
namespace: tailscale
|
||||
labels:
|
||||
app: tailscale-operator
|
||||
spec:
|
||||
ports:
|
||||
- port: 8080
|
||||
name: http-metrics
|
||||
targetPort: http-metrics
|
||||
selector:
|
||||
app: tailscale-operator
|
||||
@@ -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
|
||||
@@ -1,4 +1,4 @@
|
||||
apiVersion: external-secrets.io/v1beta1
|
||||
apiVersion: external-secrets.io/v1
|
||||
kind: ExternalSecret
|
||||
metadata:
|
||||
name: tailscale-auth
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: tailscale
|
||||
@@ -19,20 +19,19 @@ spec:
|
||||
containers:
|
||||
- name: operator
|
||||
image: ghcr.io/tailscale/k8s-operator:v1.78.3
|
||||
imagePullPolicy: IfNotPresent
|
||||
env:
|
||||
- name: POD_NAME
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
apiVersion: v1
|
||||
fieldPath: metadata.name
|
||||
- name: POD_NAMESPACE
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
apiVersion: v1
|
||||
fieldPath: metadata.namespace
|
||||
- name: TS_CLIENT_ID_FILE
|
||||
- name: CLIENT_ID_FILE
|
||||
value: /etc/tailscale/oauth/client-id
|
||||
- name: TS_CLIENT_SECRET_FILE
|
||||
- name: CLIENT_SECRET_FILE
|
||||
value: /etc/tailscale/oauth/client-secret
|
||||
volumeMounts:
|
||||
- name: oauth-secret
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
apiVersion: external-secrets.io/v1
|
||||
kind: ExternalSecret
|
||||
metadata:
|
||||
name: tailscale-operator-secret
|
||||
namespace: tailscale
|
||||
spec:
|
||||
refreshInterval: 1h
|
||||
secretStoreRef:
|
||||
name: orion-vault
|
||||
kind: ClusterSecretStore
|
||||
target:
|
||||
name: tailscale-operator-secret
|
||||
creationPolicy: Owner
|
||||
data:
|
||||
- secretKey: client-id
|
||||
remoteRef:
|
||||
key: tailscale/operator
|
||||
property: CLIENT_ID_FILE
|
||||
- secretKey: client-secret
|
||||
remoteRef:
|
||||
key: tailscale/operator
|
||||
property: CLIENT_SECRET_FILE
|
||||
@@ -1,37 +0,0 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: tailscale-operator
|
||||
namespace: tailscale
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: tailscale-operator
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: tailscale-operator
|
||||
spec:
|
||||
containers:
|
||||
- name: operator
|
||||
image: ghcr.io/tailscale/k8s-operator:latest
|
||||
env:
|
||||
- name: TS_K8S_NAMESPACE
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.namespace
|
||||
- name: TS_K8S_SECRET
|
||||
value: tailscale-operator-secret
|
||||
- name: TS_CLIENT_ID_FILE
|
||||
value: /etc/tailscale/oauth/client-id
|
||||
- name: TS_CLIENT_SECRET_FILE
|
||||
value: /etc/tailscale/oauth/client-secret
|
||||
volumeMounts:
|
||||
- name: oauth-secret
|
||||
mountPath: /etc/tailscale/oauth
|
||||
readOnly: true
|
||||
volumes:
|
||||
- name: oauth-secret
|
||||
secret:
|
||||
secretName: tailscale-operator-secret
|
||||
@@ -0,0 +1,29 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: whoami
|
||||
namespace: apps
|
||||
labels:
|
||||
app: whoami
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: whoami
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: whoami
|
||||
spec:
|
||||
containers:
|
||||
- name: whoami
|
||||
image: traefik/whoami:latest
|
||||
ports:
|
||||
- containerPort: 80
|
||||
resources:
|
||||
requests:
|
||||
cpu: 50m
|
||||
memory: 64Mi
|
||||
limits:
|
||||
cpu: 200m
|
||||
memory: 128Mi
|
||||
@@ -0,0 +1,18 @@
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: whoami
|
||||
namespace: apps
|
||||
spec:
|
||||
ingressClassName: traefik
|
||||
rules:
|
||||
- host: whoami.khalisio.com
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: whoami
|
||||
port:
|
||||
name: http
|
||||
@@ -0,0 +1,13 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: whoami
|
||||
namespace: apps
|
||||
spec:
|
||||
selector:
|
||||
app: whoami
|
||||
ports:
|
||||
- name: http
|
||||
port: 80
|
||||
targetPort: 80
|
||||
type: ClusterIP
|
||||
Reference in New Issue
Block a user