|
| 1 | +apiVersion: template.openshift.io/v1 |
| 2 | +kind: Template |
| 3 | +metadata: |
| 4 | + name: openshift-web-console |
| 5 | + annotations: |
| 6 | + openshift.io/display-name: OpenShift Web Console |
| 7 | + description: The server for the OpenShift web console. |
| 8 | + iconClass: icon-openshift |
| 9 | + tags: openshift,infra |
| 10 | + openshift.io/documentation-url: https://github.com/openshift/origin-web-console-server |
| 11 | + openshift.io/support-url: https://access.redhat.com |
| 12 | + openshift.io/provider-display-name: Red Hat, Inc. |
| 13 | +parameters: |
| 14 | +- name: IMAGE |
| 15 | + value: openshift/origin-web-console:latest |
| 16 | +- name: NAMESPACE |
| 17 | + value: openshift-web-console |
| 18 | +- name: LOGLEVEL |
| 19 | + value: "0" |
| 20 | +- name: API_SERVER_CONFIG |
| 21 | +- name: NODE_SELECTOR |
| 22 | + value: "{}" |
| 23 | +- name: REPLICA_COUNT |
| 24 | + value: "1" |
| 25 | +objects: |
| 26 | + |
| 27 | +# to create the web console server |
| 28 | +- apiVersion: apps/v1beta1 |
| 29 | + kind: Deployment |
| 30 | + metadata: |
| 31 | + namespace: ${NAMESPACE} |
| 32 | + name: webconsole |
| 33 | + labels: |
| 34 | + app: openshift-web-console |
| 35 | + webconsole: "true" |
| 36 | + spec: |
| 37 | + replicas: ${{REPLICA_COUNT}} |
| 38 | + strategy: |
| 39 | + type: Recreate |
| 40 | + template: |
| 41 | + metadata: |
| 42 | + name: webconsole |
| 43 | + labels: |
| 44 | + webconsole: "true" |
| 45 | + spec: |
| 46 | + serviceAccountName: webconsole |
| 47 | + containers: |
| 48 | + - name: c |
| 49 | + image: ${IMAGE} |
| 50 | + imagePullPolicy: IfNotPresent |
| 51 | + command: |
| 52 | + - "/usr/bin/origin-web-console" |
| 53 | + - "--audit-log-path=-" |
| 54 | + - "--config=/var/webconsole-config/webconsole-config.yaml" |
| 55 | + ports: |
| 56 | + - containerPort: 8443 |
| 57 | + volumeMounts: |
| 58 | + - mountPath: /var/serving-cert |
| 59 | + name: serving-cert |
| 60 | + - mountPath: /var/webconsole-config |
| 61 | + name: webconsole-config |
| 62 | + readinessProbe: |
| 63 | + httpGet: |
| 64 | + path: /healthz |
| 65 | + port: 8443 |
| 66 | + scheme: HTTPS |
| 67 | + nodeSelector: "${{NODE_SELECTOR}}" |
| 68 | + volumes: |
| 69 | + - name: serving-cert |
| 70 | + secret: |
| 71 | + defaultMode: 420 |
| 72 | + secretName: webconsole-serving-cert |
| 73 | + - name: webconsole-config |
| 74 | + configMap: |
| 75 | + defaultMode: 420 |
| 76 | + name: webconsole-config |
| 77 | + |
| 78 | +# to create the config for the web console |
| 79 | +- apiVersion: v1 |
| 80 | + kind: ConfigMap |
| 81 | + metadata: |
| 82 | + namespace: ${NAMESPACE} |
| 83 | + name: webconsole-config |
| 84 | + labels: |
| 85 | + app: openshift-web-console |
| 86 | + data: |
| 87 | + webconsole-config.yaml: ${API_SERVER_CONFIG} |
| 88 | + |
| 89 | +# to be able to assign powers to the process |
| 90 | +- apiVersion: v1 |
| 91 | + kind: ServiceAccount |
| 92 | + metadata: |
| 93 | + namespace: ${NAMESPACE} |
| 94 | + name: webconsole |
| 95 | + labels: |
| 96 | + app: openshift-web-console |
| 97 | + |
| 98 | +# to be able to expose web console inside the cluster |
| 99 | +- apiVersion: v1 |
| 100 | + kind: Service |
| 101 | + metadata: |
| 102 | + namespace: ${NAMESPACE} |
| 103 | + name: webconsole |
| 104 | + labels: |
| 105 | + app: openshift-web-console |
| 106 | + annotations: |
| 107 | + service.alpha.openshift.io/serving-cert-secret-name: webconsole-serving-cert |
| 108 | + spec: |
| 109 | + selector: |
| 110 | + webconsole: "true" |
| 111 | + ports: |
| 112 | + - name: https |
| 113 | + port: 443 |
| 114 | + targetPort: 8443 |
0 commit comments