mirror of
https://github.com/outbackdingo/cozystack.git
synced 2026-01-28 02:18:36 +00:00
Merge pull request #638 from klinch0/feature/move-kubeconfig
feature/mv-kubeconfig
This commit is contained in:
@@ -4,4 +4,4 @@ description: Separated tenant namespace
|
||||
icon: /logos/tenant.svg
|
||||
|
||||
type: application
|
||||
version: 1.6.8
|
||||
version: 1.7.0
|
||||
|
||||
27
packages/apps/tenant/templates/info.yaml
Normal file
27
packages/apps/tenant/templates/info.yaml
Normal file
@@ -0,0 +1,27 @@
|
||||
{{- $cozyConfig := lookup "v1" "ConfigMap" "cozy-system" "cozystack" }}
|
||||
{{- $oidcEnabled := index $cozyConfig.data "oidc-enabled" }}
|
||||
{{- if $oidcEnabled }}
|
||||
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||
kind: HelmRelease
|
||||
metadata:
|
||||
name: info
|
||||
namespace: {{ include "tenant.name" . }}
|
||||
annotations:
|
||||
helm.sh/resource-policy: keep
|
||||
labels:
|
||||
cozystack.io/ui: "true"
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
spec:
|
||||
chart:
|
||||
spec:
|
||||
chart: info
|
||||
reconcileStrategy: Revision
|
||||
sourceRef:
|
||||
kind: HelmRepository
|
||||
name: cozystack-extra
|
||||
namespace: cozy-public
|
||||
version: "*"
|
||||
interval: 1m0s
|
||||
timeout: 5m0s
|
||||
{{- end }}
|
||||
@@ -272,6 +272,7 @@ rules:
|
||||
- virtualmachines
|
||||
- vmdisks
|
||||
- vminstances
|
||||
- infos
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
|
||||
@@ -102,7 +102,8 @@ tenant 1.6.4 3c9e50a4
|
||||
tenant 1.6.5 f1e11451
|
||||
tenant 1.6.6 d4634797
|
||||
tenant 1.6.7 06afcf27
|
||||
tenant 1.6.8 HEAD
|
||||
tenant 1.6.8 4cc48e6f
|
||||
tenant 1.7.0 HEAD
|
||||
virtual-machine 0.1.4 f2015d6
|
||||
virtual-machine 0.1.5 7cd7de7
|
||||
virtual-machine 0.2.0 5ca8823
|
||||
|
||||
2
packages/extra/info/.helmignore
Normal file
2
packages/extra/info/.helmignore
Normal file
@@ -0,0 +1,2 @@
|
||||
.helmignore
|
||||
/logos
|
||||
6
packages/extra/info/Chart.yaml
Normal file
6
packages/extra/info/Chart.yaml
Normal file
@@ -0,0 +1,6 @@
|
||||
apiVersion: v2
|
||||
name: info
|
||||
description: Info
|
||||
icon: /logos/info.svg
|
||||
type: application
|
||||
version: 1.0.0
|
||||
3
packages/extra/info/Makefile
Normal file
3
packages/extra/info/Makefile
Normal file
@@ -0,0 +1,3 @@
|
||||
NAME=etcd
|
||||
|
||||
include ../../../scripts/package.mk
|
||||
18
packages/extra/info/README.md
Normal file
18
packages/extra/info/README.md
Normal file
@@ -0,0 +1,18 @@
|
||||
# Info
|
||||
|
||||
### Kubeconfig for tenant
|
||||
|
||||
### Kubelogin
|
||||
|
||||
For using kubeconfig need install kubelogin.
|
||||
|
||||
```bash
|
||||
# Homebrew (macOS and Linux)
|
||||
brew install int128/kubelogin/kubelogin
|
||||
|
||||
# Krew (macOS, Linux, Windows and ARM)
|
||||
kubectl krew install oidc-login
|
||||
|
||||
# Chocolatey (Windows)
|
||||
choco install kubelogin
|
||||
```
|
||||
13
packages/extra/info/logos/info.svg
Normal file
13
packages/extra/info/logos/info.svg
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg fill="#000000" version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
width="800px" height="800px" viewBox="0 0 32 32" xml:space="preserve">
|
||||
<g>
|
||||
<path d="M17.962,24.725l1.806,0.096v2.531h-7.534v-2.406l1.045-0.094c0.568-0.063,0.916-0.254,0.916-1.014v-8.801
|
||||
c0-0.699-0.188-0.92-0.791-0.92l-1.106-0.062v-2.626h5.666L17.962,24.725L17.962,24.725z M15.747,4.648
|
||||
c1.394,0,2.405,1.047,2.405,2.374c0,1.331-1.014,2.313-2.438,2.313c-1.454,0-2.404-0.982-2.404-2.313
|
||||
C13.31,5.695,14.26,4.648,15.747,4.648z M16,32C7.178,32,0,24.822,0,16S7.178,0,16,0c8.82,0,16,7.178,16,16S24.82,32,16,32z M16,3
|
||||
C8.832,3,3,8.832,3,16s5.832,13,13,13s13-5.832,13-13S23.168,3,16,3z"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 963 B |
@@ -1,13 +1,12 @@
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: Role
|
||||
metadata:
|
||||
name: {{ include "tenant.name" . }}-dashboard-resources
|
||||
namespace: {{ .Release.namespace }}
|
||||
name: info-dashboard-resources
|
||||
rules:
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- secrets
|
||||
resourceNames:
|
||||
- kubeconfig-{{ include "tenant.name" . }}
|
||||
- kubeconfig-{{ .Release.Namespace }}
|
||||
verbs: ["get", "list", "watch"]
|
||||
@@ -15,8 +15,7 @@
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: kubeconfig-{{ include "tenant.name" . }}
|
||||
namespace: tenant-root
|
||||
name: kubeconfig-{{ .Release.Namespace }}
|
||||
stringData:
|
||||
kubeconfig: |
|
||||
apiVersion: v1
|
||||
@@ -28,10 +27,10 @@ stringData:
|
||||
contexts:
|
||||
- context:
|
||||
cluster: cluster
|
||||
namespace: {{ include "tenant.name" . }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
user: keycloak
|
||||
name: {{ include "tenant.name" . }}
|
||||
current-context: {{ include "tenant.name" . }}
|
||||
name: {{ .Release.Namespace }}
|
||||
current-context: {{ .Release.Namespace }}
|
||||
users:
|
||||
- name: keycloak
|
||||
user:
|
||||
1
packages/extra/info/values.schema.json
Normal file
1
packages/extra/info/values.schema.json
Normal file
@@ -0,0 +1 @@
|
||||
{}
|
||||
0
packages/extra/info/values.yaml
Normal file
0
packages/extra/info/values.yaml
Normal file
@@ -7,6 +7,7 @@ etcd 2.2.0 5ca8823
|
||||
etcd 2.3.0 b908400d
|
||||
etcd 2.4.0 cb7b8158
|
||||
etcd 2.5.0 HEAD
|
||||
info 1.0.0 HEAD
|
||||
ingress 1.0.0 f642698
|
||||
ingress 1.1.0 838bee5d
|
||||
ingress 1.2.0 ced8e5b
|
||||
|
||||
@@ -314,3 +314,17 @@ data:
|
||||
kind: HelmRepository
|
||||
name: cozystack-extra
|
||||
namespace: cozy-public
|
||||
- application:
|
||||
kind: Info
|
||||
plural: infos
|
||||
singular: info
|
||||
release:
|
||||
prefix: ""
|
||||
labels:
|
||||
cozystack.io/ui: "true"
|
||||
chart:
|
||||
name: info
|
||||
sourceRef:
|
||||
kind: HelmRepository
|
||||
name: cozystack-extra
|
||||
namespace: cozy-public
|
||||
|
||||
@@ -361,3 +361,17 @@ kubeapps:
|
||||
kind: HelmRepository
|
||||
name: cozystack-extra
|
||||
namespace: cozy-public
|
||||
- application:
|
||||
kind: Info
|
||||
plural: infos
|
||||
singular: info
|
||||
release:
|
||||
prefix: ""
|
||||
labels:
|
||||
cozystack.io/ui: "true"
|
||||
chart:
|
||||
name: info
|
||||
sourceRef:
|
||||
kind: HelmRepository
|
||||
name: cozystack-extra
|
||||
namespace: cozy-public
|
||||
|
||||
Reference in New Issue
Block a user