From 254b895faadf0c547741537168e85bb30f6f4275 Mon Sep 17 00:00:00 2001 From: Sander van Vugt Date: Tue, 8 Dec 2020 10:12:34 +0100 Subject: [PATCH] dec 20 update --- crontab-crd.yaml | 30 ++++++++++++++++++++++++++++++ kube-setup.sh | 12 ++++++++++++ list-pods-mysa-binding.yaml | 13 +++++++++++++ list-pods.yaml | 12 ++++++++++++ my-sslcert.yaml | 8 ++++++++ mypod.yaml | 11 +++++++++++ mysa.yaml | 4 ++++ mysapod.yaml | 12 ++++++++++++ sslcerts-crd.yaml | 30 ++++++++++++++++++++++++++++++ traefik-ds.yaml | 4 ++-- 10 files changed, 134 insertions(+), 2 deletions(-) create mode 100644 crontab-crd.yaml create mode 100644 list-pods-mysa-binding.yaml create mode 100644 list-pods.yaml create mode 100644 my-sslcert.yaml create mode 100644 mypod.yaml create mode 100644 mysa.yaml create mode 100644 mysapod.yaml create mode 100644 sslcerts-crd.yaml diff --git a/crontab-crd.yaml b/crontab-crd.yaml new file mode 100644 index 0000000..301efc0 --- /dev/null +++ b/crontab-crd.yaml @@ -0,0 +1,30 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + name: crontabs.stable.example.com +spec: + group: stable.example.com + versions: + - name: v1 + served: true + storage: true + schema: + openAPIV3Schema: + type: object + properties: + spec: + type: object + properties: + cronSpec: + type: string + image: + type: string + replicas: + type: integer + scope: Namespaced + names: + plural: crontabs + singular: crontab + kind: CronTab + shortNames: + - ct diff --git a/kube-setup.sh b/kube-setup.sh index bf06f3b..3c54843 100755 --- a/kube-setup.sh +++ b/kube-setup.sh @@ -8,6 +8,18 @@ echo it requires the machine where you run it to have 6GB of RAM or more echo press Enter to continue read +########## +echo ######################################## +echo WARNING +echo ######################################## +echo Nov 2020 - currently this script is NOT supported on Mac OS Big Sur +echo I will communicate here one Apple/VMware have provided updates that make it work again +echo +echo Check the Setup Guide provided in this repository for alternative installations +echo +echo press Enter to continue +read + # setting MYOS variable MYOS=$(hostnamectl | awk '/Operating/ { print $3 }') OSVERSION=$(hostnamectl | awk '/Operating/ { print $4 }') diff --git a/list-pods-mysa-binding.yaml b/list-pods-mysa-binding.yaml new file mode 100644 index 0000000..fd5a999 --- /dev/null +++ b/list-pods-mysa-binding.yaml @@ -0,0 +1,13 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: list-pods-mysa-binding + namespace: default +roleRef: + kind: Role + name: list-pods + apiGroup: rbac.authorization.k8s.io +subjects: + - kind: ServiceAccount + name: mysa + namespace: default diff --git a/list-pods.yaml b/list-pods.yaml new file mode 100644 index 0000000..9c9d8b9 --- /dev/null +++ b/list-pods.yaml @@ -0,0 +1,12 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: list-pods + namespace: default +rules: + - apiGroups: + - '' + resources: + - pods + verbs: + - list diff --git a/my-sslcert.yaml b/my-sslcert.yaml new file mode 100644 index 0000000..8e38ef4 --- /dev/null +++ b/my-sslcert.yaml @@ -0,0 +1,8 @@ +apiVersion: stable.example.com/v1 +kind: SslConfig +metadata: + name: my-sslcert +spec: + cert: mycertfile + key : myprivatekey + domain: "*.stable.example.com" diff --git a/mypod.yaml b/mypod.yaml new file mode 100644 index 0000000..232e76e --- /dev/null +++ b/mypod.yaml @@ -0,0 +1,11 @@ +apiVersion: v1 +kind: Pod +metadata: + name: mypod +spec: + containers: + - name: alpine + image: alpine:3.9 + command: + - "sleep" + - "3600" diff --git a/mysa.yaml b/mysa.yaml new file mode 100644 index 0000000..ea51c36 --- /dev/null +++ b/mysa.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + name: mysa diff --git a/mysapod.yaml b/mysapod.yaml new file mode 100644 index 0000000..ac1b9a8 --- /dev/null +++ b/mysapod.yaml @@ -0,0 +1,12 @@ +apiVersion: v1 +kind: Pod +metadata: + name: mysapod +spec: + serviceAccountName: mysa + containers: + - name: alpine + image: alpine:3.9 + command: + - "sleep" + - "3600" diff --git a/sslcerts-crd.yaml b/sslcerts-crd.yaml new file mode 100644 index 0000000..f21f4c8 --- /dev/null +++ b/sslcerts-crd.yaml @@ -0,0 +1,30 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + name: sslconfigs.stable.example.com +spec: + group: stable.example.com + versions: + - name: v1 + served: true + storage: true + schema: + openAPIV3Schema: + type: object + properties: + spec: + type: object + properties: + cert: + type: string + key: + type: string + domain: + type: string + scope: Namespaced + names: + plural: sslconfigs + singular: sslconfig + kind: SslConfig + shortNames: + - ssl diff --git a/traefik-ds.yaml b/traefik-ds.yaml index 3f68714..5ed32ae 100644 --- a/traefik-ds.yaml +++ b/traefik-ds.yaml @@ -19,8 +19,8 @@ spec: name: traefik-ingress-lb template: metadata: - labels: - ks8-app: traefik-ingress-lb + labels: + k8s-app: traefik-ingress-lb name: traefik-ingress-lb spec: serviceAccountName: traefik-ingress-controller