/
openshift_oauth_apiserver.go
51 lines (44 loc) · 1.08 KB
/
openshift_oauth_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
package manifests
import (
"fmt"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
apiregistrationv1 "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1"
)
func OpenShiftOAuthAPIServerClusterEndpoints() *corev1.Endpoints {
return &corev1.Endpoints{
ObjectMeta: metav1.ObjectMeta{
Name: "openshift-oauth-apiserver",
Namespace: "default",
},
}
}
func OpenShiftOAuthAPIServerClusterService() *corev1.Service {
return &corev1.Service{
ObjectMeta: metav1.ObjectMeta{
Name: "openshift-oauth-apiserver",
Namespace: "default",
},
}
}
func OpenShiftOAuthAPIServerAPIService(group string) *apiregistrationv1.APIService {
return &apiregistrationv1.APIService{
ObjectMeta: metav1.ObjectMeta{
Name: fmt.Sprintf("v1.%s.openshift.io", group),
},
}
}
func OpenShiftOAuthAPIServerAPIServiceGroups() []string {
return []string{
"oauth",
"user",
}
}
func OpenShiftOAuthAPIServerService(ns string) *corev1.Service {
return &corev1.Service{
ObjectMeta: metav1.ObjectMeta{
Name: "openshift-oauth-apiserver",
Namespace: ns,
},
}
}