From 032d6b790a77b9c22be26556239068d4c3f27fa5 Mon Sep 17 00:00:00 2001 From: Marcelo Moreira de Mello Date: Fri, 9 Apr 2021 00:33:23 -0400 Subject: [PATCH 1/3] Added OKD console deployment --- scripts/okd-console.yaml | 115 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 115 insertions(+) create mode 100644 scripts/okd-console.yaml diff --git a/scripts/okd-console.yaml b/scripts/okd-console.yaml new file mode 100644 index 00000000..6d6525cf --- /dev/null +++ b/scripts/okd-console.yaml @@ -0,0 +1,115 @@ +### Don't run this deployment in production +### The current configuration will run the +### OKD console without any autentication!!!! +### +### A prerequisite is to install the OLM +### as instructed at https://olm.operatorframework.io/docs/getting-started/#install-released-olm +### +### i.e: +### $ export olm_release=0.15.1 +### $ kubectl apply -f https://github.com/operator-framework/operator-lifecycle-manager/releases/download/${olm_release}/crds.yaml +### $ kubectl apply -f https://github.com/operator-framework/operator-lifecycle-manager/releases/download/${olm_release}/olm.yaml +### +### This deployment is intented to run locally +### and to troubleshoot OLM UI changes. +### +### To access the console, then execute: +### kubectl port-forward svc/okd-console -n okd-console 9000:9000 +### +### Then point your browser: +### http://localhost:9000 +--- +apiVersion: v1 +kind: Namespace +metadata: + name: okd-console +--- +apiVersion: v1 +kind: ServiceAccount +metadata: + labels: + k8s-app: okd-console + name: okd-console + namespace: okd-console +--- +apiVersion: rbac.authorization.k8s.io/v1beta1 +kind: ClusterRoleBinding +metadata: + name: okd-console + labels: + k8s-app: okd-console +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: cluster-admin +subjects: +- kind: ServiceAccount + name: okd-console + namespace: okd-console +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: okd-console + namespace: okd-console + labels: + k8s-app: okd-console +spec: + replicas: 1 + selector: + matchLabels: + k8s-app: okd-console + strategy: + rollingUpdate: + maxSurge: 25% + maxUnavailable: 25% + type: RollingUpdate + template: + metadata: + labels: + k8s-app: okd-console + spec: + serviceAccountName: okd-console + containers: + - name: okd-console + image: quay.io/openshift/origin-console:4.9.0 + imagePullPolicy: IfNotPresent + livenessProbe: + tcpSocket: + port: web + initialDelaySeconds: 2 + periodSeconds: 10 + failureThreshold: 60 + readinessProbe: + tcpSocket: + port: web + initialDelaySeconds: 2 + periodSeconds: 10 + failureThreshold: 60 + resources: + requests: + memory: "128Mi" + cpu: "100m" + limits: + memory: "1024Mi" + cpu: "550m" + ports: + - name: web + containerPort: 9000 + protocol: TCP +--- +apiVersion: v1 +kind: Service +metadata: + name: okd-console + namespace: okd-console + labels: + k8s-app: okd-console +spec: + ports: + - name: web + targetPort: 9000 + port: 9000 + protocol: TCP + selector: + k8s-app: okd-console From bdcd95ab55be1630131807210187e53aaed21275 Mon Sep 17 00:00:00 2001 From: Marcelo Moreira de Mello Date: Wed, 14 Apr 2021 11:45:46 -0400 Subject: [PATCH 2/3] Fixing lint --- scripts/okd-console.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/okd-console.yaml b/scripts/okd-console.yaml index 6d6525cf..a8f1c78c 100644 --- a/scripts/okd-console.yaml +++ b/scripts/okd-console.yaml @@ -1,5 +1,5 @@ ### Don't run this deployment in production -### The current configuration will run the +### The current configuration will run the ### OKD console without any autentication!!!! ### ### A prerequisite is to install the OLM @@ -45,7 +45,7 @@ roleRef: subjects: - kind: ServiceAccount name: okd-console - namespace: okd-console + namespace: okd-console --- apiVersion: apps/v1 kind: Deployment @@ -76,8 +76,8 @@ spec: imagePullPolicy: IfNotPresent livenessProbe: tcpSocket: - port: web - initialDelaySeconds: 2 + port: web + initialDelaySeconds: 2 periodSeconds: 10 failureThreshold: 60 readinessProbe: @@ -107,7 +107,7 @@ metadata: k8s-app: okd-console spec: ports: - - name: web + - name: web targetPort: 9000 port: 9000 protocol: TCP From 13f7b2ae303b12fd56e71b1f6109fdb444ede7d3 Mon Sep 17 00:00:00 2001 From: Marcelo Moreira de Mello Date: Wed, 14 Apr 2021 12:00:26 -0400 Subject: [PATCH 3/3] Fixed indentation lint --- scripts/okd-console.yaml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/scripts/okd-console.yaml b/scripts/okd-console.yaml index a8f1c78c..11112f74 100644 --- a/scripts/okd-console.yaml +++ b/scripts/okd-console.yaml @@ -43,9 +43,9 @@ roleRef: kind: ClusterRole name: cluster-admin subjects: -- kind: ServiceAccount - name: okd-console - namespace: okd-console + - kind: ServiceAccount + name: okd-console + namespace: okd-console --- apiVersion: apps/v1 kind: Deployment @@ -107,9 +107,9 @@ metadata: k8s-app: okd-console spec: ports: - - name: web - targetPort: 9000 - port: 9000 - protocol: TCP + - name: web + targetPort: 9000 + port: 9000 + protocol: TCP selector: k8s-app: okd-console