-
Notifications
You must be signed in to change notification settings - Fork 300
/
openshift_apiserver.go
77 lines (68 loc) · 1.53 KB
/
openshift_apiserver.go
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
package manifests
import (
"fmt"
appsv1 "k8s.io/api/apps/v1"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
apiregistrationv1 "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1"
)
func OpenShiftAPIServerClusterEndpoints() *corev1.Endpoints {
return &corev1.Endpoints{
ObjectMeta: metav1.ObjectMeta{
Name: "openshift-apiserver",
Namespace: "default",
},
}
}
func OpenShiftAPIServerClusterService() *corev1.Service {
return &corev1.Service{
ObjectMeta: metav1.ObjectMeta{
Name: "openshift-apiserver",
Namespace: "default",
},
}
}
func OpenShiftAPIServerAPIService(group string) *apiregistrationv1.APIService {
return &apiregistrationv1.APIService{
ObjectMeta: metav1.ObjectMeta{
Name: fmt.Sprintf("v1.%s.openshift.io", group),
},
}
}
func OpenShiftAPIServerAPIServiceGroups() []string {
return []string{
"apps",
"authorization",
"build",
"image",
"quota",
"route",
"security",
"template",
"project",
}
}
func OpenShiftAPIServerService(ns string) *corev1.Service {
return &corev1.Service{
ObjectMeta: metav1.ObjectMeta{
Name: "openshift-apiserver",
Namespace: ns,
},
}
}
func OpenShiftAPIServerConfig(ns string) *corev1.ConfigMap {
return &corev1.ConfigMap{
ObjectMeta: metav1.ObjectMeta{
Name: "openshift-apiserver",
Namespace: ns,
},
}
}
func OpenShiftAPIServerDeployment(ns string) *appsv1.Deployment {
return &appsv1.Deployment{
ObjectMeta: metav1.ObjectMeta{
Name: "openshift-apiserver",
Namespace: ns,
},
}
}