File tree Expand file tree Collapse file tree 3 files changed +62
-2
lines changed Expand file tree Collapse file tree 3 files changed +62
-2
lines changed Original file line number Diff line number Diff line change @@ -4,4 +4,4 @@ description: Separated tenant namespace
4
4
icon : /logos/tenant.svg
5
5
6
6
type : application
7
- version : 1.6.0
7
+ version : 1.6.1
Original file line number Diff line number Diff line change
1
+ {{- $cozyConfig := lookup "v1" "ConfigMap" "cozy-system" "cozystack" }}
2
+ {{- $host := index $cozyConfig.data "root-host" }}
3
+ {{- $apiServerAdress := index $cozyConfig.data "api-server-adress" }}
4
+ {{- $k8sClientSecret := lookup "v1" "Secret" "cozy-keycloak" "k8s-client" }}
5
+ {{- $k8sClient := index $k8sClientSecret.data "client-secret-key" | b64dec }}
6
+ {{- $rootSaConfigMap := lookup "v1" "ConfigMap" "kube-system" "kube-root-ca.crt" }}
7
+ {{- $k8sCa := index $rootSaConfigMap.data "ca.crt" | b64enc }}
8
+
9
+ apiVersion : rbac.authorization.k8s.io/v1
10
+ kind : Role
11
+ metadata :
12
+ name : {{ include "tenant.name" . }}-dashboard-resources
13
+ namespace : {{ .Release.namespace }}
14
+ rules :
15
+ - apiGroups :
16
+ - " "
17
+ resources :
18
+ - secrets
19
+ resourceNames :
20
+ - kubeconfig-{{ include "tenant.name" . }}
21
+ verbs : ["get", "list", "watch"]
22
+
23
+
24
+ ---
25
+
26
+ apiVersion : v1
27
+ kind : Secret
28
+ metadata :
29
+ name : kubeconfig-{{ include "tenant.name" . }}
30
+ namespace : tenant-root
31
+ stringData :
32
+ kubeconfig : |
33
+ apiVersion: v1
34
+ clusters:
35
+ - cluster:
36
+ server: https://{{ $apiServerAdress }}:6443
37
+ certificate-authority-data: {{ $k8sCa }}
38
+ name: cluster
39
+ contexts:
40
+ - context:
41
+ cluster: cluster
42
+ namespace: {{ include "tenant.name" . }}
43
+ user: keycloak
44
+ name: {{ include "tenant.name" . }}
45
+ current-context: default
46
+ users:
47
+ - name: keycloak
48
+ user:
49
+ exec:
50
+ apiVersion: client.authentication.k8s.io/v1beta1
51
+ args:
52
+ - oidc-login
53
+ - get-token
54
+ - --oidc-issuer-url=https://keycloak.{{ $host }}/realms/cozy
55
+ - --oidc-client-id=kubernetes
56
+ - --oidc-client-secret={{ $k8sClient }}
57
+ - --skip-open-browser
58
+ - --grant-type=password
59
+ command: kubectl
Original file line number Diff line number Diff line change @@ -87,7 +87,8 @@ tenant 1.3.0 ceefae03
87
87
tenant 1.3.1 c56e5769
88
88
tenant 1.4.0 94c688f7
89
89
tenant 1.5.0 48128743
90
- tenant 1.6.0 HEAD
90
+ tenant 1.6.0 df448b99
91
+ tenant 1.6.1 HEAD
91
92
virtual-machine 0.1.4 f2015d6
92
93
virtual-machine 0.1.5 7cd7de7
93
94
virtual-machine 0.2.0 5ca8823
You can’t perform that action at this time.
0 commit comments