mirror of
https://github.com/YuzuZensai/netbird-kubernetes-operator.git
synced 2026-09-13 10:49:15 +00:00
Add ingress feature to controller (#5)
Co-authored-by: Maycon Santos <mlsmaycon@gmail.com>
This commit is contained in:
co-authored by
Maycon Santos
parent
cea60745d2
commit
166091b8e0
@@ -0,0 +1,47 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
labels:
|
||||
app: test
|
||||
name: test
|
||||
namespace: default
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: test
|
||||
strategy:
|
||||
rollingUpdate:
|
||||
maxSurge: 25%
|
||||
maxUnavailable: 25%
|
||||
type: RollingUpdate
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: test
|
||||
spec:
|
||||
containers:
|
||||
- image: nginx
|
||||
imagePullPolicy: Always
|
||||
name: nginx
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
annotations:
|
||||
netbird.io/expose: "true"
|
||||
netbird.io/policy: default
|
||||
netbird.io/resource-name: nginx
|
||||
labels:
|
||||
app: test
|
||||
name: test
|
||||
namespace: default
|
||||
spec:
|
||||
ports:
|
||||
- name: http
|
||||
port: 80
|
||||
protocol: TCP
|
||||
targetPort: 80
|
||||
selector:
|
||||
app: test
|
||||
type: ClusterIP
|
||||
@@ -0,0 +1,12 @@
|
||||
ingress:
|
||||
enabled: true
|
||||
router:
|
||||
enabled: true
|
||||
policies:
|
||||
default:
|
||||
name: Kubernetes Default Policy
|
||||
sourceGroups:
|
||||
- All
|
||||
|
||||
netbirdAPI:
|
||||
key: "nbp_m0LM9ZZvDUzFO0pY50iChDOTxJgKFM3DIqmZ" # Replace with valid NetBird Service Account token
|
||||
@@ -0,0 +1,49 @@
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: test
|
||||
namespace: default
|
||||
stringData:
|
||||
SETUP_KEY: 50445ABC-8901-4050-8047-0A390658A79B # Replace with valid setup key
|
||||
---
|
||||
apiVersion: netbird.io/v1
|
||||
kind: NBSetupKey
|
||||
metadata:
|
||||
name: test
|
||||
namespace: default
|
||||
spec:
|
||||
secretKeyRef:
|
||||
name: test
|
||||
key: SETUP_KEY
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
labels:
|
||||
app: test
|
||||
name: test
|
||||
namespace: default
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: test
|
||||
strategy:
|
||||
rollingUpdate:
|
||||
maxSurge: 25%
|
||||
maxUnavailable: 25%
|
||||
type: RollingUpdate
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: test
|
||||
annotations:
|
||||
netbird.io/setup-key: test
|
||||
spec:
|
||||
containers:
|
||||
- image: ubuntu
|
||||
imagePullPolicy: Always
|
||||
name: ubuntu
|
||||
command:
|
||||
- sleep
|
||||
- inf
|
||||
Reference in New Issue
Block a user