Skip to content
Snippets Groups Projects
Commit 5e795fa4 authored by Alex de Cock Buning's avatar Alex de Cock Buning
Browse files

updated final deployment

parent 50010be5
No related branches found
No related tags found
1 merge request!2repo: added new directory where utils scripts will be
apiVersion: v1
kind: ServiceAccount
metadata:
name: l2sm-operator
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: l2sm-operator
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: cluster-admin
subjects:
- kind: ServiceAccount
name: l2sm-operator
namespace: default
---
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
...@@ -44,6 +62,8 @@ spec: ...@@ -44,6 +62,8 @@ spec:
targetPort: 8181 targetPort: 8181
type: ClusterIP type: ClusterIP
--- ---
---
apiVersion: v1 apiVersion: v1
kind: Namespace kind: Namespace
metadata: metadata:
...@@ -9402,6 +9422,44 @@ kind: ClusterRole ...@@ -9402,6 +9422,44 @@ kind: ClusterRole
metadata: metadata:
name: l2sm-manager-role name: l2sm-manager-role
rules: rules:
- apiGroups:
- apps
resources:
- replicasets
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- ""
resources:
- pods
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- ""
resources:
- pods/finalizers
verbs:
- update
- apiGroups:
- ""
resources:
- pods/status
verbs:
- get
- patch
- update
- apiGroups: - apiGroups:
- l2sm.l2sm.k8s.local - l2sm.l2sm.k8s.local
resources: resources:
...@@ -9480,6 +9538,18 @@ rules: ...@@ -9480,6 +9538,18 @@ rules:
- get - get
- patch - patch
- update - update
- apiGroups:
- l2sm.l2sm.k8s.local
resources:
- replicasets
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
--- ---
apiVersion: rbac.authorization.k8s.io/v1 apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole kind: ClusterRole
...@@ -9606,6 +9676,26 @@ spec: ...@@ -9606,6 +9676,26 @@ spec:
selector: selector:
control-plane: controller-manager control-plane: controller-manager
--- ---
apiVersion: v1
kind: Service
metadata:
labels:
app.kubernetes.io/component: webhook
app.kubernetes.io/created-by: controllermanager
app.kubernetes.io/instance: webhook-service
app.kubernetes.io/managed-by: kustomize
app.kubernetes.io/name: service
app.kubernetes.io/part-of: controllermanager
name: l2sm-webhook-service
namespace: l2sm-system
spec:
ports:
- port: 443
protocol: TCP
targetPort: 9443
selector:
control-plane: controller-manager
---
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
...@@ -9632,29 +9722,6 @@ spec: ...@@ -9632,29 +9722,6 @@ spec:
control-plane: controller-manager control-plane: controller-manager
spec: spec:
containers: containers:
- args:
- --secure-listen-address=0.0.0.0:8443
- --upstream=http://127.0.0.1:8080/
- --logtostderr=true
- --v=0
image: gcr.io/kubebuilder/kube-rbac-proxy:v0.15.0
name: kube-rbac-proxy
ports:
- containerPort: 8443
name: https
protocol: TCP
resources:
limits:
cpu: 500m
memory: 128Mi
requests:
cpu: 5m
memory: 64Mi
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
- args: - args:
- --health-probe-bind-address=:8081 - --health-probe-bind-address=:8081
- --metrics-bind-address=127.0.0.1:8080 - --metrics-bind-address=127.0.0.1:8080
...@@ -9664,7 +9731,9 @@ spec: ...@@ -9664,7 +9731,9 @@ spec:
env: env:
- name: CONTROLLER_IP - name: CONTROLLER_IP
value: l2sm-controller-service.default.svc.cluster.local value: l2sm-controller-service.default.svc.cluster.local
image: alexdecb/l2sm-controller-manager:2.4 - name: CONTROLLER_PORT
value: "8181"
image: alexdecb/l2sm-controller-manager:2.5
livenessProbe: livenessProbe:
httpGet: httpGet:
path: /healthz path: /healthz
...@@ -9672,6 +9741,10 @@ spec: ...@@ -9672,6 +9741,10 @@ spec:
initialDelaySeconds: 15 initialDelaySeconds: 15
periodSeconds: 20 periodSeconds: 20
name: manager name: manager
ports:
- containerPort: 9443
name: webhook-server
protocol: TCP
readinessProbe: readinessProbe:
httpGet: httpGet:
path: /readyz path: /readyz
...@@ -9690,10 +9763,117 @@ spec: ...@@ -9690,10 +9763,117 @@ spec:
capabilities: capabilities:
drop: drop:
- ALL - ALL
volumeMounts:
- mountPath: /tmp/k8s-webhook-server/serving-certs
name: cert
readOnly: true
- args:
- --secure-listen-address=0.0.0.0:8443
- --upstream=http://127.0.0.1:8080/
- --logtostderr=true
- --v=0
image: gcr.io/kubebuilder/kube-rbac-proxy:v0.15.0
name: kube-rbac-proxy
ports:
- containerPort: 8443
name: https
protocol: TCP
resources:
limits:
cpu: 500m
memory: 128Mi
requests:
cpu: 5m
memory: 64Mi
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
securityContext: securityContext:
runAsNonRoot: true runAsNonRoot: true
serviceAccountName: l2sm-controller-manager serviceAccountName: l2sm-controller-manager
terminationGracePeriodSeconds: 10 terminationGracePeriodSeconds: 10
volumes:
- name: cert
secret:
defaultMode: 420
secretName: webhook-server-cert
---
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
labels:
app.kubernetes.io/component: certificate
app.kubernetes.io/created-by: controllermanager
app.kubernetes.io/instance: serving-cert
app.kubernetes.io/managed-by: kustomize
app.kubernetes.io/name: certificate
app.kubernetes.io/part-of: controllermanager
name: l2sm-serving-cert
namespace: l2sm-system
spec:
dnsNames:
- l2sm-webhook-service.l2sm-system.svc
- l2sm-webhook-service.l2sm-system.svc.cluster.local
issuerRef:
kind: Issuer
name: l2sm-selfsigned-issuer
secretName: webhook-server-cert
---
apiVersion: cert-manager.io/v1
kind: Issuer
metadata:
labels:
app.kubernetes.io/component: certificate
app.kubernetes.io/created-by: controllermanager
app.kubernetes.io/instance: serving-cert
app.kubernetes.io/managed-by: kustomize
app.kubernetes.io/name: certificate
app.kubernetes.io/part-of: controllermanager
name: l2sm-selfsigned-issuer
namespace: l2sm-system
spec:
selfSigned: {}
---
apiVersion: admissionregistration.k8s.io/v1
kind: MutatingWebhookConfiguration
metadata:
annotations:
cert-manager.io/inject-ca-from: l2sm-system/l2sm-serving-cert
labels:
app.kubernetes.io/component: webhook
app.kubernetes.io/created-by: controllermanager
app.kubernetes.io/instance: mutating-webhook-configuration
app.kubernetes.io/managed-by: kustomize
app.kubernetes.io/name: mutatingwebhookconfiguration
app.kubernetes.io/part-of: controllermanager
name: l2sm-mutating-webhook-configuration
webhooks:
- admissionReviewVersions:
- v1
clientConfig:
caBundle: ""
service:
name: l2sm-webhook-service
namespace: l2sm-system
path: /mutate-v1-pod
failurePolicy: Ignore
name: mpod.kb.io
objectSelector:
matchLabels:
l2sm: "true"
rules:
- apiGroups:
- ""
apiVersions:
- v1
operations:
- CREATE
- UPDATE
resources:
- pods
sideEffects: None
--- ---
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
...@@ -9725,7 +9905,7 @@ spec: ...@@ -9725,7 +9905,7 @@ spec:
done; done;
sleep 5; sleep 5;
containers: containers:
- image: alexdecb/l2sm-operator:2.4 - image: alexdecb/l2sm-operator:2.5
name: l2sm-opt-pod name: l2sm-opt-pod
env: env:
- name: CONTROLLER_IP - name: CONTROLLER_IP
...@@ -9800,7 +9980,7 @@ spec: ...@@ -9800,7 +9980,7 @@ spec:
sleep 5; sleep 5;
containers: containers:
- name: l2sm-switch - name: l2sm-switch
image: alexdecb/l2sm-switch:2.4 image: alexdecb/l2sm-switch:2.5
# imagePullPolicy: Always # imagePullPolicy: Always
#args: ["setup_switch.sh && sleep infinity"] #args: ["setup_switch.sh && sleep infinity"]
env: env:
...@@ -9824,6 +10004,8 @@ apiVersion: "k8s.cni.cncf.io/v1" ...@@ -9824,6 +10004,8 @@ apiVersion: "k8s.cni.cncf.io/v1"
kind: NetworkAttachmentDefinition kind: NetworkAttachmentDefinition
metadata: metadata:
name: veth10 name: veth10
labels:
app: l2sm
spec: spec:
config: '{ config: '{
"cniVersion": "0.3.0", "cniVersion": "0.3.0",
...@@ -9841,6 +10023,8 @@ apiVersion: "k8s.cni.cncf.io/v1" ...@@ -9841,6 +10023,8 @@ apiVersion: "k8s.cni.cncf.io/v1"
kind: NetworkAttachmentDefinition kind: NetworkAttachmentDefinition
metadata: metadata:
name: veth1 name: veth1
labels:
app: l2sm
spec: spec:
config: '{ config: '{
"cniVersion": "0.3.0", "cniVersion": "0.3.0",
...@@ -9858,6 +10042,8 @@ apiVersion: "k8s.cni.cncf.io/v1" ...@@ -9858,6 +10042,8 @@ apiVersion: "k8s.cni.cncf.io/v1"
kind: NetworkAttachmentDefinition kind: NetworkAttachmentDefinition
metadata: metadata:
name: veth2 name: veth2
labels:
app: l2sm
spec: spec:
config: '{ config: '{
"cniVersion": "0.3.0", "cniVersion": "0.3.0",
...@@ -9875,6 +10061,8 @@ apiVersion: "k8s.cni.cncf.io/v1" ...@@ -9875,6 +10061,8 @@ apiVersion: "k8s.cni.cncf.io/v1"
kind: NetworkAttachmentDefinition kind: NetworkAttachmentDefinition
metadata: metadata:
name: veth3 name: veth3
labels:
app: l2sm
spec: spec:
config: '{ config: '{
"cniVersion": "0.3.0", "cniVersion": "0.3.0",
...@@ -9892,6 +10080,8 @@ apiVersion: "k8s.cni.cncf.io/v1" ...@@ -9892,6 +10080,8 @@ apiVersion: "k8s.cni.cncf.io/v1"
kind: NetworkAttachmentDefinition kind: NetworkAttachmentDefinition
metadata: metadata:
name: veth4 name: veth4
labels:
app: l2sm
spec: spec:
config: '{ config: '{
"cniVersion": "0.3.0", "cniVersion": "0.3.0",
...@@ -9909,6 +10099,8 @@ apiVersion: "k8s.cni.cncf.io/v1" ...@@ -9909,6 +10099,8 @@ apiVersion: "k8s.cni.cncf.io/v1"
kind: NetworkAttachmentDefinition kind: NetworkAttachmentDefinition
metadata: metadata:
name: veth5 name: veth5
labels:
app: l2sm
spec: spec:
config: '{ config: '{
"cniVersion": "0.3.0", "cniVersion": "0.3.0",
...@@ -9926,6 +10118,8 @@ apiVersion: "k8s.cni.cncf.io/v1" ...@@ -9926,6 +10118,8 @@ apiVersion: "k8s.cni.cncf.io/v1"
kind: NetworkAttachmentDefinition kind: NetworkAttachmentDefinition
metadata: metadata:
name: veth6 name: veth6
labels:
app: l2sm
spec: spec:
config: '{ config: '{
"cniVersion": "0.3.0", "cniVersion": "0.3.0",
...@@ -9943,6 +10137,8 @@ apiVersion: "k8s.cni.cncf.io/v1" ...@@ -9943,6 +10137,8 @@ apiVersion: "k8s.cni.cncf.io/v1"
kind: NetworkAttachmentDefinition kind: NetworkAttachmentDefinition
metadata: metadata:
name: veth7 name: veth7
labels:
app: l2sm
spec: spec:
config: '{ config: '{
"cniVersion": "0.3.0", "cniVersion": "0.3.0",
...@@ -9960,6 +10156,8 @@ apiVersion: "k8s.cni.cncf.io/v1" ...@@ -9960,6 +10156,8 @@ apiVersion: "k8s.cni.cncf.io/v1"
kind: NetworkAttachmentDefinition kind: NetworkAttachmentDefinition
metadata: metadata:
name: veth8 name: veth8
labels:
app: l2sm
spec: spec:
config: '{ config: '{
"cniVersion": "0.3.0", "cniVersion": "0.3.0",
...@@ -9977,6 +10175,8 @@ apiVersion: "k8s.cni.cncf.io/v1" ...@@ -9977,6 +10175,8 @@ apiVersion: "k8s.cni.cncf.io/v1"
kind: NetworkAttachmentDefinition kind: NetworkAttachmentDefinition
metadata: metadata:
name: veth9 name: veth9
labels:
app: l2sm
spec: spec:
config: '{ config: '{
"cniVersion": "0.3.0", "cniVersion": "0.3.0",
...@@ -10082,22 +10282,19 @@ spec: ...@@ -10082,22 +10282,19 @@ spec:
items: items:
- key: init.sql - key: init.sql
path: init.sql path: init.sql
nodeName: l2sm1
--- ---
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
name: mysql-development-service name: mysql-development-service
spec: spec:
type: NodePort type: ClusterIP
ports: ports:
- port: 3306 - port: 3306
targetPort: 3306 targetPort: 3306
nodePort: 30001
protocol: TCP protocol: TCP
selector: selector:
app: mysql app: mysql
--- ---
apiVersion: v1 apiVersion: v1
kind: Secret kind: Secret
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment