diff --git a/apply_all_yamls.sh b/apply_all_yamls.sh index 1782dcd..c3c1f60 100644 --- a/apply_all_yamls.sh +++ b/apply_all_yamls.sh @@ -1,4 +1,6 @@ #!/bin/bash -#ls /etc/k8s/manifests/**/*.yaml | xargs -n 1 bash -c 'minikube kubectl -- apply -f $0' \ No newline at end of file +#ls /etc/k8s/manifests/**/*.yaml | xargs -n 1 bash -c 'minikube kubectl -- apply -f $0' + +ls /etc/k8s/manifests/**/*.yaml | xargs -n 1 bash -c 'kubectl apply -f $0' \ No newline at end of file diff --git a/check/ahoy-hw.yaml b/check/ahoy-hw.yaml deleted file mode 100644 index d2fe641..0000000 --- a/check/ahoy-hw.yaml +++ /dev/null @@ -1,18 +0,0 @@ -apiVersion: networking.k8s.io/v1 -kind: Ingress -metadata: - name: ahoy - namespace: default -spec: - ingressClassName: cilium - rules: - - host: ahoy-hw.guaranteedstruggle.host - http: - paths: - - path: / - pathType: Prefix - backend: - service: - name: ahoy-hello-world - port: - name: app diff --git a/check/bgp-policy.yaml b/check/bgp-policy.yaml deleted file mode 100644 index e7220d0..0000000 --- a/check/bgp-policy.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: "cilium.io/v2alpha1" -kind: CiliumBGPPeeringPolicy -metadata: - name: 01-bgp-peering-policy -spec: - nodeSelector: - matchLabels: - bgp-policy: a - virtualRouters: - - localASN: 64512 - exportPodCIDR: true - neighbors: - - peerAddress: '192.168.0.105/32' - peerASN: 64512 - serviceSelector: - matchExpressions: - - {key: somekey, operator: NotIn, values: ['never-used-value']} diff --git a/check/config-pool.yaml b/check/config-pool.yaml deleted file mode 100644 index 9c9358b..0000000 --- a/check/config-pool.yaml +++ /dev/null @@ -1,12 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - namespace: metallb-system - name: config -data: - config: | - address-pools: - - name: default - protocol: layer2 - addresses: - - 192.168.0.105-192.168.0.105 diff --git a/check/default-ingress.yaml b/check/default-ingress.yaml deleted file mode 100644 index c920bff..0000000 --- a/check/default-ingress.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: networking.k8s.io/v1 -kind: Ingress -metadata: - name: redirect - namespace: weave -spec: - ingressClassName: cilium - rules: - - http: - paths: - - path: / - pathType: Prefix - backend: - service: - name: weave-scope-app - port: - name: app diff --git a/check/httproute-ahoy.yaml b/check/httproute-ahoy.yaml deleted file mode 100644 index 7123a41..0000000 --- a/check/httproute-ahoy.yaml +++ /dev/null @@ -1,20 +0,0 @@ ---- -apiVersion: gateway.networking.k8s.io/v1beta1 -kind: HTTPRoute -metadata: - name: http-ahoy - namespace: default -spec: - hostnames: - - ahoy.guaranteedstruggle.host - parentRefs: - - name: my-gateway - namespace: default - rules: - - matches: - - path: - type: PathPrefix - value: / - backendRefs: - - name: ahoy-hello-world - port: 80 diff --git a/check/httproute-artifactory.yaml b/check/httproute-artifactory.yaml deleted file mode 100644 index 1cb040d..0000000 --- a/check/httproute-artifactory.yaml +++ /dev/null @@ -1,20 +0,0 @@ ---- -apiVersion: gateway.networking.k8s.io/v1beta1 -kind: HTTPRoute -metadata: - name: http-artifactory - namespace: artifactory -spec: - hostnames: - - artifactory.guaranteedstruggle.host - parentRefs: - - name: my-gateway - namespace: default - rules: - - matches: - - path: - type: PathPrefix - value: / - backendRefs: - - name: artifactory-artifactory-nginx - port: 80 diff --git a/check/longhorn.yaml b/check/longhorn.yaml deleted file mode 100644 index ef45b6e..0000000 --- a/check/longhorn.yaml +++ /dev/null @@ -1,18 +0,0 @@ -apiVersion: networking.k8s.io/v1 -kind: Ingress -metadata: - name: longhorn - namespace: longhorn-system -spec: - ingressClassName: cilium - rules: - - host: longhorn.guaranteedstruggle.host - http: - paths: - - path: / - pathType: Prefix - backend: - service: - name: longhorn-frontend - port: - name: http diff --git a/check/network-policy-wut.yaml b/check/network-policy-wut.yaml deleted file mode 100644 index 1aaa192..0000000 --- a/check/network-policy-wut.yaml +++ /dev/null @@ -1,16 +0,0 @@ -apiVersion: "cilium.io/v2" -kind: CiliumNetworkPolicy -#description: "Allow to access backends only on TCP/80" -metadata: - name: "frontend-backend" -spec: - endpointSelector: - matchLabels: - namespace: longhorn-system - ingress: - - toPorts: - - ports: - - port: '80' - protocol: TCP - - fromCIDR: - - 0.0.0.0/0 diff --git a/check/rancher.yaml b/check/rancher.yaml deleted file mode 100644 index 2b306fd..0000000 --- a/check/rancher.yaml +++ /dev/null @@ -1,20 +0,0 @@ -apiVersion: networking.k8s.io/v1 -kind: Ingress -metadata: - name: rancher - namespace: default - annotations: - ingress.cilium.io/insecure-node-port: "80" -spec: - ingressClassName: cilium - rules: - - host: rancher.guaranteedstruggle.host - http: - paths: - - path: / - pathType: Prefix - backend: - service: - name: myrancher - port: - name: http diff --git a/check/weave.yaml b/check/weave.yaml deleted file mode 100644 index 35c46ea..0000000 --- a/check/weave.yaml +++ /dev/null @@ -1,18 +0,0 @@ -apiVersion: networking.k8s.io/v1 -kind: Ingress -metadata: - name: weave - namespace: weave -spec: - ingressClassName: cilium - rules: - - host: weave.guaranteedstruggle.host - http: - paths: - - path: / - pathType: Prefix - backend: - service: - name: weave-scope-app - port: - name: app diff --git a/manifests/00-system-stuff/gateway.yaml b/manifests/00-system-stuff/gateway.yaml new file mode 100644 index 0000000..d3c1ff8 --- /dev/null +++ b/manifests/00-system-stuff/gateway.yaml @@ -0,0 +1,22 @@ +--- +apiVersion: gateway.networking.k8s.io/v1beta1 +kind: Gateway +metadata: + name: my-gateway + labels: + color: coral +spec: + gatewayClassName: cilium + addresses: + - value: "0.0.0.0" + - type: IPAddress + value: 192.168.0.105 + - type: IPAddress + value: 10.0.10.251 + listeners: + - protocol: HTTP + port: 80 + name: web-gw + allowedRoutes: + namespaces: + from: All diff --git a/manifests/00-system-stuff/ippool.yaml b/manifests/00-system-stuff/ippool.yaml new file mode 100644 index 0000000..c33e046 --- /dev/null +++ b/manifests/00-system-stuff/ippool.yaml @@ -0,0 +1,9 @@ +apiVersion: "cilium.io/v2alpha1" +kind: CiliumLoadBalancerIPPool +metadata: + name: "lb-pool" +spec: + cidrs: + + - cidr: "10.0.10.0/24" + diff --git a/manifests/01-deployments/flask-htmx-dev.yaml b/manifests/01-deployments/flask-htmx-dev.yaml deleted file mode 100644 index 23f970d..0000000 --- a/manifests/01-deployments/flask-htmx-dev.yaml +++ /dev/null @@ -1,39 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: flask-htmx-dev - namespace: vdk2ch -spec: - revisionHistoryLimit: 3 - replicas: 2 - selector: - matchLabels: - app: flask-htmx-dev - template: - metadata: - labels: - app: flask-htmx-dev - spec: - containers: - - name: flask-htmx-dev - image: flask-htmx-board1:dev - ports: - - containerPort: 5000 - - #### таймауты и прочее взяты с потолка - livenessProbe: - httpGet: - path: /liveness - port: 5000 - initialDelaySeconds: 2 - timeoutSeconds: 2 - periodSeconds: 5 - failureThreshold: 2 - readinessProbe: - httpGet: - path: /readiness - port: 5000 - initialDelaySeconds: 3 - timeoutSeconds: 3 - periodSeconds: 10 - failureThreshold: 3 \ No newline at end of file diff --git a/manifests/01-deployments/flask-htmx-master.yaml b/manifests/01-deployments/flask-htmx-master.yaml deleted file mode 100644 index ad4b421..0000000 --- a/manifests/01-deployments/flask-htmx-master.yaml +++ /dev/null @@ -1,39 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: flask-htmx-master - namespace: vdk2ch -spec: - revisionHistoryLimit: 5 - replicas: 2 - selector: - matchLabels: - app: flask-htmx-master - template: - metadata: - labels: - app: flask-htmx-master - spec: - containers: - - name: flask-htmx-master - image: flask-htmx-board1:master-of-slaves - ports: - - containerPort: 5000 - - #### таймауты и прочее взяты с потолка - livenessProbe: - httpGet: - path: /liveness - port: 5000 - initialDelaySeconds: 2 - timeoutSeconds: 2 - periodSeconds: 5 - failureThreshold: 2 - readinessProbe: - httpGet: - path: /readiness - port: 5000 - initialDelaySeconds: 3 - timeoutSeconds: 3 - periodSeconds: 10 - failureThreshold: 3 diff --git a/manifests/01-deployments/flask-htmx-our-style.yaml b/manifests/01-deployments/flask-htmx-our-style.yaml deleted file mode 100644 index d43ba76..0000000 --- a/manifests/01-deployments/flask-htmx-our-style.yaml +++ /dev/null @@ -1,39 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: flask-htmx-our-style - namespace: vdk2ch -spec: - revisionHistoryLimit: 3 - replicas: 2 - selector: - matchLabels: - app: flask-htmx-our-style - template: - metadata: - labels: - app: flask-htmx-our-style - spec: - containers: - - name: flask-htmx-our-style - image: flask-htmx-board1:our-style - ports: - - containerPort: 5000 - - #### таймауты и прочее взяты с потолка - livenessProbe: - httpGet: - path: /liveness - port: 5000 - initialDelaySeconds: 2 - timeoutSeconds: 2 - periodSeconds: 5 - failureThreshold: 2 - readinessProbe: - httpGet: - path: /readiness - port: 5000 - initialDelaySeconds: 3 - timeoutSeconds: 3 - periodSeconds: 10 - failureThreshold: 3 \ No newline at end of file diff --git a/manifests/01-deployments/hw-hw.yaml b/manifests/01-deployments/hw-hw.yaml deleted file mode 100644 index 9428f28..0000000 --- a/manifests/01-deployments/hw-hw.yaml +++ /dev/null @@ -1,34 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: helloworld - namespace: vdk2ch - annotations: - description: 'my frontend running nginx' - labels: - labe1: my_test_label1 - labe2: my_test_label -spec: - revisionHistoryLimit: 0 - selector: - matchLabels: - app: helloworld - replicas: 1 # tells deployment to run 1 pods matching the template - template: # create pods using pod definition in this template - metadata: - labels: - app: helloworld - what-ever-label-i-add-here: 'test_string-asfd14123UE.asdfeee333DS' - what/here.com: '312321' - labe2: my_test_label - labe3: my_test_label3 - annotations: - imageregistry: "https://hub.docker.com/" - what/here.com2: "https://github.com/" - anno: 'where it will stop??' - spec: - containers: - - name: helloworld - image: karthequian/helloworld:latest - ports: - - containerPort: 80 \ No newline at end of file diff --git a/manifests/00-namespaces/vdk2ch.yaml b/manifests/01-namespaces/vdk2ch.yaml similarity index 100% rename from manifests/00-namespaces/vdk2ch.yaml rename to manifests/01-namespaces/vdk2ch.yaml diff --git a/check/deployment-flask-htmx-board-dev.yaml b/manifests/02-deployments/deployment-flask-htmx-board-dev.yaml similarity index 100% rename from check/deployment-flask-htmx-board-dev.yaml rename to manifests/02-deployments/deployment-flask-htmx-board-dev.yaml diff --git a/check/deployment-flask-htmx-board-master.yaml b/manifests/02-deployments/deployment-flask-htmx-board-master.yaml similarity index 100% rename from check/deployment-flask-htmx-board-master.yaml rename to manifests/02-deployments/deployment-flask-htmx-board-master.yaml diff --git a/check/deployment-flask-htmx-board-our-style.yaml b/manifests/02-deployments/deployment-flask-htmx-board-our-style.yaml similarity index 100% rename from check/deployment-flask-htmx-board-our-style.yaml rename to manifests/02-deployments/deployment-flask-htmx-board-our-style.yaml diff --git a/manifests/02-services/flask-htmx-dev-service.yaml b/manifests/02-services/flask-htmx-dev-service.yaml deleted file mode 100644 index a25be07..0000000 --- a/manifests/02-services/flask-htmx-dev-service.yaml +++ /dev/null @@ -1,14 +0,0 @@ ---- -apiVersion: v1 -kind: Service -metadata: - name: flask-htmx-dev-service - namespace: vdk2ch -spec: - selector: - app: flask-htmx-dev - ports: - - protocol: TCP - name: board - port: 5000 - targetPort: 5000 diff --git a/manifests/02-services/flask-htmx-master-service.yaml b/manifests/02-services/flask-htmx-master-service.yaml deleted file mode 100644 index 69298ee..0000000 --- a/manifests/02-services/flask-htmx-master-service.yaml +++ /dev/null @@ -1,14 +0,0 @@ ---- -apiVersion: v1 -kind: Service -metadata: - name: flask-htmx-master-service - namespace: vdk2ch -spec: - selector: - app: flask-htmx-master - ports: - - protocol: TCP - name: board - port: 5000 - targetPort: 5000 diff --git a/manifests/02-services/flask-htmx-our-style-service.yaml b/manifests/02-services/flask-htmx-our-style-service.yaml deleted file mode 100644 index f0d251d..0000000 --- a/manifests/02-services/flask-htmx-our-style-service.yaml +++ /dev/null @@ -1,14 +0,0 @@ ---- -apiVersion: v1 -kind: Service -metadata: - name: flask-htmx-our-style-service - namespace: vdk2ch -spec: - selector: - app: flask-htmx-our-style - ports: - - protocol: TCP - name: board - port: 5000 - targetPort: 5000 diff --git a/manifests/02-services/hw-service.yaml b/manifests/02-services/hw-service.yaml deleted file mode 100644 index 87c0ae4..0000000 --- a/manifests/02-services/hw-service.yaml +++ /dev/null @@ -1,24 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: hw-service - namespace: vdk2ch -spec: - type: NodePort - selector: - app: helloworld - ports: - - port: 80 - targetPort: 80 - nodePort: 30001 - - - # - protocol: TCP - # port: 8080 - # targetPort: 8080 - # nodePort: 32129 - #name: http - #protocol: TCP - - - #nodePort: 30001 \ No newline at end of file diff --git a/manifests/03-ingress/flask-htmx-ingress.yaml b/manifests/03-ingress/flask-htmx-ingress.yaml deleted file mode 100644 index 171f0e3..0000000 --- a/manifests/03-ingress/flask-htmx-ingress.yaml +++ /dev/null @@ -1,51 +0,0 @@ ---- -apiVersion: networking.k8s.io/v1 -kind: Ingress -metadata: - name: flask-htmx-ingress - namespace: vdk2ch - annotations: - nginx.ingress.kubernetes.io/rewrite-target: /$1 - #nginx.ingress.kubernetes.io/app-root: / -spec: - rules: - - host: master.board.vdk2ch.ru - http: - paths: - - path: /(.*) - pathType: Prefix - backend: - service: - name: flask-htmx-master-service - port: - number: 5000 - - host: dev.board.vdk2ch.ru - http: - paths: - - path: /(.*) - pathType: Prefix - backend: - service: - name: flask-htmx-dev-service - port: - number: 5000 - - host: our-style.board.vdk2ch.ru - http: - paths: - - path: /(.*) - pathType: Prefix - backend: - service: - name: flask-htmx-our-style-service - port: - number: 5000 - - host: q.q.vdk2ch.ru - http: - paths: - - path: /(.*) - pathType: Prefix - backend: - service: - name: flask-htmx-our-style-service - port: - number: 5000 \ No newline at end of file diff --git a/manifests/03-ingress/hw-ingress.yaml b/manifests/03-ingress/hw-ingress.yaml deleted file mode 100644 index 859dc4b..0000000 --- a/manifests/03-ingress/hw-ingress.yaml +++ /dev/null @@ -1,27 +0,0 @@ ---- -apiVersion: networking.k8s.io/v1 -kind: Ingress -metadata: - name: hw-ingress - namespace: vdk2ch - annotations: - nginx.ingress.kubernetes.io/rewrite-target: /$1 -spec: - rules: - - host: asdf.vdk2ch.ru - http: - paths: - - path: /v1 - pathType: Prefix - backend: - service: - name: hw-service - port: - number: 80 - # - path: / - # pathType: Prefix - # backend: - # service: - # name: hw-service - # port: - # number: 80 \ No newline at end of file diff --git a/manifests/03-ingress/minikube-dashboard-ingress.yaml b/manifests/03-ingress/minikube-dashboard-ingress.yaml deleted file mode 100644 index 97a305f..0000000 --- a/manifests/03-ingress/minikube-dashboard-ingress.yaml +++ /dev/null @@ -1,22 +0,0 @@ -apiVersion: networking.k8s.io/v1 -kind: Ingress -metadata: - name: minikube-dashboard-ingress - namespace: kubernetes-dashboard - annotations: - #nginx.ingress.kubernetes.io/rewrite-target: /$1 - nginx.ingress.kubernetes.io/rewrite-target: / - nginx.ingress.kubernetes.io/enable-cors: "false" -spec: - rules: - - host: minikube.guaranteedstruggle.host - http: - paths: - - path: / - pathType: Prefix - backend: - service: - name: kubernetes-dashboard - port: - number: 80 - \ No newline at end of file diff --git a/manifests/03-ingress/web2-ingress.yaml b/manifests/03-ingress/web2-ingress.yaml deleted file mode 100644 index 029fadb..0000000 --- a/manifests/03-ingress/web2-ingress.yaml +++ /dev/null @@ -1,19 +0,0 @@ -apiVersion: networking.k8s.io/v1 -kind: Ingress -metadata: - name: example-ingress - namespace: vdk2ch - annotations: - nginx.ingress.kubernetes.io/rewrite-target: /$1 -spec: - rules: - - host: asdf.vdk2ch.ru - http: - paths: - - path: /v2 - pathType: Prefix - backend: - service: - name: web2 - port: - number: 8080 \ No newline at end of file diff --git a/check/svc-flask-htmx-board-dev.yaml b/manifests/03-services/svc-flask-htmx-board-dev.yaml similarity index 100% rename from check/svc-flask-htmx-board-dev.yaml rename to manifests/03-services/svc-flask-htmx-board-dev.yaml diff --git a/check/svc-flask-htmx-board-master.yaml b/manifests/03-services/svc-flask-htmx-board-master.yaml similarity index 100% rename from check/svc-flask-htmx-board-master.yaml rename to manifests/03-services/svc-flask-htmx-board-master.yaml diff --git a/check/svc-flask-htmx-board-our-style.yaml b/manifests/03-services/svc-flask-htmx-board-our-style.yaml similarity index 100% rename from check/svc-flask-htmx-board-our-style.yaml rename to manifests/03-services/svc-flask-htmx-board-our-style.yaml diff --git a/check/httproute-dashy.yaml b/manifests/04-httproutes/httproute-dashy.yaml similarity index 100% rename from check/httproute-dashy.yaml rename to manifests/04-httproutes/httproute-dashy.yaml diff --git a/check/httproute-flask-htmx-board-dev.yaml b/manifests/04-httproutes/httproute-flask-htmx-board-dev.yaml similarity index 100% rename from check/httproute-flask-htmx-board-dev.yaml rename to manifests/04-httproutes/httproute-flask-htmx-board-dev.yaml diff --git a/check/httproute-flask-htmx-board-master.yaml b/manifests/04-httproutes/httproute-flask-htmx-board-master.yaml similarity index 100% rename from check/httproute-flask-htmx-board-master.yaml rename to manifests/04-httproutes/httproute-flask-htmx-board-master.yaml diff --git a/check/httproute-flask-htmx-board-our-style.yaml b/manifests/04-httproutes/httproute-flask-htmx-board-our-style.yaml similarity index 100% rename from check/httproute-flask-htmx-board-our-style.yaml rename to manifests/04-httproutes/httproute-flask-htmx-board-our-style.yaml diff --git a/check/httproute-harbor.yaml b/manifests/04-httproutes/httproute-harbor.yaml similarity index 100% rename from check/httproute-harbor.yaml rename to manifests/04-httproutes/httproute-harbor.yaml diff --git a/check/httproute-hubble.yaml b/manifests/04-httproutes/httproute-hubble.yaml similarity index 100% rename from check/httproute-hubble.yaml rename to manifests/04-httproutes/httproute-hubble.yaml diff --git a/check/httproute-longhorn.yaml b/manifests/04-httproutes/httproute-longhorn.yaml similarity index 100% rename from check/httproute-longhorn.yaml rename to manifests/04-httproutes/httproute-longhorn.yaml diff --git a/check/httproute-rancher.yaml b/manifests/04-httproutes/httproute-rancher.yaml similarity index 84% rename from check/httproute-rancher.yaml rename to manifests/04-httproutes/httproute-rancher.yaml index 9d001a6..c74e959 100644 --- a/check/httproute-rancher.yaml +++ b/manifests/04-httproutes/httproute-rancher.yaml @@ -2,7 +2,7 @@ apiVersion: gateway.networking.k8s.io/v1beta1 kind: HTTPRoute metadata: - name: http-app-1 + name: http-rancher namespace: default spec: hostnames: @@ -21,8 +21,6 @@ spec: set: - name: X-Forwarded-Proto value: https -# - name: Host -# value: rancher.guaranteedstruggle.host backendRefs: - name: myrancher port: 80 diff --git a/check/httproute-weave.yaml b/manifests/04-httproutes/httproute-weave.yaml similarity index 94% rename from check/httproute-weave.yaml rename to manifests/04-httproutes/httproute-weave.yaml index 7787570..6a49840 100644 --- a/check/httproute-weave.yaml +++ b/manifests/04-httproutes/httproute-weave.yaml @@ -2,7 +2,7 @@ apiVersion: gateway.networking.k8s.io/v1beta1 kind: HTTPRoute metadata: - name: http-app-2 + name: http-weave namespace: weave spec: hostnames: