-
Notifications
You must be signed in to change notification settings - Fork 34
/
oc-manifest.yaml
110 lines (110 loc) · 3.54 KB
/
oc-manifest.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
apiVersion: template.openshift.io/v1
kind: Template
metadata:
name: console-plugin-kubevirt-template
annotations:
openshift.io/display-name: OpenShift Console Kubevirt Plugin Template
openshift.io/documentation-url: 'https://github.com/kubevirt-ui/kubevirt-plugin'
iconClass: icon-nginx
tags: openshift,console,plugin,nginx,virtualization,kubevirt
parameters:
- description: Name of your plugin. This name must match the name in the consolePlugin declaration in package.json.
name: PLUGIN_NAME
value: console-plugin-kubevirt
required: true
- description: Namespace for your plugin. The namespace will be created by the template.
name: NAMESPACE
value: console-plugin-kubevirt
required: true
- description: Container image of the plugin.
name: IMAGE
value: quay.io/repository/kubevirt-ui/kubevirt-plugin:latest
required: true
message: >-
To enable the plugin on the cluster, run the following command:
oc patch consoles.operator.openshift.io cluster --patch '{ "spec": { "plugins": ["${PLUGIN_NAME}"] } }' --type=merge
For more information about using this template, see https://github.com/edge-infrastructure/console-plugin-kubevirt
objects:
- apiVersion: apps/v1
kind: Deployment
metadata:
name: '${PLUGIN_NAME}'
namespace: '${NAMESPACE}'
labels:
app: '${PLUGIN_NAME}'
app.kubernetes.io/component: '${PLUGIN_NAME}'
app.kubernetes.io/instance: '${PLUGIN_NAME}'
app.kubernetes.io/part-of: '${PLUGIN_NAME}'
app.openshift.io/runtime-namespace: '${NAMESPACE}'
spec:
replicas: 1
selector:
matchLabels:
app: '${PLUGIN_NAME}'
template:
metadata:
labels:
app: '${PLUGIN_NAME}'
spec:
containers:
- name: '${PLUGIN_NAME}'
image: '${IMAGE}'
ports:
- containerPort: 9443
protocol: TCP
imagePullPolicy: Always
volumeMounts:
- name: plugin-serving-cert
readOnly: true
mountPath: /var/serving-cert
volumes:
- name: plugin-serving-cert
secret:
secretName: plugin-serving-cert
defaultMode: 420
- name: nginx-conf
configMap:
name: nginx-conf
defaultMode: 420
restartPolicy: Always
dnsPolicy: ClusterFirst
strategy:
type: RollingUpdate
rollingUpdate:
maxUnavailable: 25%
maxSurge: 25%
- apiVersion: v1
kind: Service
metadata:
annotations:
service.alpha.openshift.io/serving-cert-secret-name: plugin-serving-cert
name: '${PLUGIN_NAME}'
namespace: '${NAMESPACE}'
labels:
app: '${PLUGIN_NAME}'
app.kubernetes.io/component: '${PLUGIN_NAME}'
app.kubernetes.io/instance: '${PLUGIN_NAME}'
app.kubernetes.io/part-of: '${PLUGIN_NAME}'
spec:
ports:
- name: 9443-tcp
protocol: TCP
port: 9443
targetPort: 9443
selector:
app: '${PLUGIN_NAME}'
type: ClusterIP
sessionAffinity: None
- apiVersion: console.openshift.io/v1alpha1
kind: ConsolePlugin
metadata:
name: '${PLUGIN_NAME}'
annotations:
console.openshift.io/use-i18n: 'true'
spec:
displayName: 'Console Plugin Kubevirt Template'
service:
name: '${PLUGIN_NAME}'
namespace: '${NAMESPACE}'
port: 9443
basePath: '/'