Skip to content

Commit

Permalink
feat: general development (#82)
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverbaehler authored Apr 17, 2023
1 parent e4d9c88 commit beef8c3
Show file tree
Hide file tree
Showing 29 changed files with 830 additions and 705 deletions.
2 changes: 1 addition & 1 deletion charts/vcluster/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: vcluster
description: Virtual Kubernetes Cluster
type: application
version: 0.1.3
version: 0.2.0
appVersion: 0.1.0
keywords:
- vcluster
Expand Down
152 changes: 87 additions & 65 deletions charts/vcluster/README.md

Large diffs are not rendered by default.

51 changes: 37 additions & 14 deletions charts/vcluster/README.md.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -225,22 +225,20 @@ Available Values for the [Operating System Manager](). The component consists of

Available Values for the [Kubernetes component](#kubernetes).



### API-Server

{{- template "table.heading" $ }}
{{- range .Values }}
{{- if and (hasPrefix "kubernetes." .Key) (contains "apiServer." .Key) }}
{{- if and (hasPrefix "kubernetes." .Key) (not (or (contains "apiServer." .Key) (contains "controllerManager." .Key) (contains "scheduler." .Key) (contains "etcd." .Key) (contains "konnectivity." .Key) (contains "admin." .Key) (contains "coredns." .Key))) }}
| {{ .Key }} | {{ .Type }} | {{ if .Default }}{{ .Default }}{{ else }}{{ .AutoDefault }}{{ end }} | {{ if .Description }}{{ .Description }}{{ else }}{{ .AutoDescription }}{{ end }} |
{{- end }}
{{- end }}

### Konnektivity-Server


### API-Server

{{- template "table.heading" $ }}
{{- range .Values }}
{{- if and (hasPrefix "kubernetes." .Key) (contains "konnectivityServer." .Key) }}
{{- if and (hasPrefix "kubernetes." .Key) (contains "apiServer." .Key) }}
| {{ .Key }} | {{ .Type }} | {{ if .Default }}{{ .Default }}{{ else }}{{ .AutoDefault }}{{ end }} | {{ if .Description }}{{ .Description }}{{ else }}{{ .AutoDescription }}{{ end }} |
{{- end }}
{{- end }}
Expand Down Expand Up @@ -273,32 +271,57 @@ Available Values for the [Kubernetes component](#kubernetes).
{{- end }}
{{- end }}

### Admin
### Konnektivity

Deploys an administration pod which has the admin kubeconfig mounted and allows for easy access to the cluster.
Konnectivity is required to establish a connection to the API Server from the cluster network. [Read More about it](https://kubernetes.io/docs/tasks/extend-kubernetes/setup-konnectivity/). The following values are available for both Konnectivity Components:

{{- template "table.heading" $ }}
{{- range .Values }}
{{- if and (hasPrefix "kubernetes." .Key) (contains "admin." .Key) }}
{{- if and (hasPrefix "kubernetes." .Key) (contains "konnectivity." .Key) (not (or (contains "agent" .Key) (contains "server" .Key))) }}
| {{ .Key }} | {{ .Type }} | {{ if .Default }}{{ .Default }}{{ else }}{{ .AutoDefault }}{{ end }} | {{ if .Description }}{{ .Description }}{{ else }}{{ .AutoDescription }}{{ end }} |
{{- end }}
{{- end }}

### CoreDNS (In-Cluster)

#### Server

The Konnectivity-Server is deployed alongside with the API-Server. It must be reachable for the Konnectivity-Agent.

{{- template "table.heading" $ }}
{{- range .Values }}
{{- if and (hasPrefix "kubernetes." .Key) (contains "coredns." .Key) }}
{{- if and (hasPrefix "kubernetes." .Key) (contains "konnectivity." .Key) (contains "server" .Key) }}
| {{ .Key }} | {{ .Type }} | {{ if .Default }}{{ .Default }}{{ else }}{{ .AutoDefault }}{{ end }} | {{ if .Description }}{{ .Description }}{{ else }}{{ .AutoDescription }}{{ end }} |
{{- end }}
{{- end }}

#### Agent (In-Cluster)

### Konnektivity-Agent (In-Cluster)
The konnectivity-Agent is deployed inside the vcluster and should establish a connection to the Konnectivity-Server. We recommend running the Konnectivity-Agent as Daemonset.

{{- template "table.heading" $ }}
{{- range .Values }}
{{- if and (hasPrefix "kubernetes." .Key) (contains "konnectivityAgent." .Key) }}
{{- if and (hasPrefix "kubernetes." .Key) (contains "konnectivity." .Key) (contains "agent" .Key) }}
| {{ .Key }} | {{ .Type }} | {{ if .Default }}{{ .Default }}{{ else }}{{ .AutoDefault }}{{ end }} | {{ if .Description }}{{ .Description }}{{ else }}{{ .AutoDescription }}{{ end }} |
{{- end }}
{{- end }}


### Admin

Deploys an administration pod which has the admin kubeconfig mounted and allows for easy access to the cluster.

{{- template "table.heading" $ }}
{{- range .Values }}
{{- if and (hasPrefix "kubernetes." .Key) (contains "admin." .Key) }}
| {{ .Key }} | {{ .Type }} | {{ if .Default }}{{ .Default }}{{ else }}{{ .AutoDefault }}{{ end }} | {{ if .Description }}{{ .Description }}{{ else }}{{ .AutoDescription }}{{ end }} |
{{- end }}
{{- end }}

### CoreDNS (In-Cluster)

{{- template "table.heading" $ }}
{{- range .Values }}
{{- if and (hasPrefix "kubernetes." .Key) (contains "coredns." .Key) }}
| {{ .Key }} | {{ .Type }} | {{ if .Default }}{{ .Default }}{{ else }}{{ .AutoDefault }}{{ end }} | {{ if .Description }}{{ .Description }}{{ else }}{{ .AutoDescription }}{{ end }} |
{{- end }}
{{- end }}
Expand Down
13 changes: 7 additions & 6 deletions charts/vcluster/addons/scripts/configure-vcluster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,19 +64,20 @@ kubectl apply -f /manifests/regcred.yaml
kubectl delete secret {{ include "pkg.images.registry.secretname" $ }} -n {{ include "pkg.images.registry.secretnamespace" $ }} 2>/dev/null || true
{{- end }}

{{- if $kubernetes.konnectivityServer.enabled }}{{"\n"}}
{{- if and $kubernetes.konnectivity.enabled $kubernetes.konnectivity.server.enabled }}{{"\n"}}
# install konnectivity server
kubectl apply -f /manifests/konnectivity-server-rbac.yaml
kubectl apply -f /manifests/konnectivity-server.yaml
{{- else }}{{"\n"}}
kubectl delete -f /manifests/konnectivity-server-rbac.yaml 2>/dev/null || true
kubectl delete ClusterRoleBinding ystem:konnectivity-server || true
{{- end }}

{{- if $kubernetes.konnectivityAgent.enabled }}{{"\n"}}

{{- if and $kubernetes.konnectivity.enabled $kubernetes.konnectivity.agent.enabled }}{{"\n"}}
# install konnectivity agent
kubectl apply -f /manifests/konnectivity-agent-deployment.yaml -f /manifests/konnectivity-agent-rbac.yaml
kubectl apply -f /manifests/konnectivity-agent.yaml
{{- else }}{{"\n"}}
# uninstall konnectivity agent
kubectl delete -f /manifests/konnectivity-agent-deployment.yaml -f /manifests/konnectivity-agent-rbac.yaml 2>/dev/null || true
kubectl delete sa/ 2>/dev/null || true
{{- end }}

{{- if $kubernetes.coredns.enabled }}{{"\n"}}
Expand Down

This file was deleted.

This file was deleted.

Loading

0 comments on commit beef8c3

Please sign in to comment.