Skip to content

Commit

Permalink
[vcluster]: deprecation remove gitops component (#90)
Browse files Browse the repository at this point in the history
* deprecation: remove gitops component

* fix: update helm-docs
  • Loading branch information
oliverbaehler authored May 1, 2023
1 parent 7d3d780 commit 180ea26
Show file tree
Hide file tree
Showing 23 changed files with 120 additions and 1,463 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.3.4
version: 0.4.0
appVersion: 0.1.0
keywords:
- vcluster
Expand Down
39 changes: 2 additions & 37 deletions charts/vcluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

__This Chart is under active development! We try to improve documentation and values consistency over time__

![Version: 0.3.4](https://img.shields.io/badge/Version-0.3.4-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)
![Version: 0.4.0](https://img.shields.io/badge/Version-0.4.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)

Virtual Kubernetes Cluster

Expand Down Expand Up @@ -64,40 +64,12 @@ Based on [Cluster Autoscaler](https://github.com/kubernetes/autoscaler).
Allows to scale Kubernetes clusters based on the number of pods and nodes.
The component is deployed as a single deployment with a `controller` container. Since it's deployed on a hosting cluster, it's possible to downscale workers to zero and scale up again.

## GitOps

# Guides

## Exposure

### Admission

## ArgoCD Access

### Forwards the ArgoCD UI to your local machine

We must forward the ArgoCD within the new cluster in the kubectl client.
You can access the ArgoCD UI by running the following command:

```bash
# Execute Kubectl Container
kubectl exec -it test-cluster-kubectl sh -n machine-controller2

# Extract Admin Password
kubectl get secret -n argocd argocd-initial-admin-secret -o jsonpath='{.data.password}' | base64 -d

# Forward ArgoCD UI
kubectl port-forward svc/argocd-server 8080:80 -n argocd
```

Open second terminal and run the following command:

```bash
kubectl port-forward pod/test-cluster-kubectl 9191:8080 -n machine-controller2
```

Access the ArgoCD UI by opening [http://localhost:9191]( http://localhost:9191) in your browser. Login with `admin` and previously extract password.

# Values

## Globals
Expand Down Expand Up @@ -900,11 +872,4 @@ Available Values for the [Autsocaler component](#autoscaler).
| autoscaler.metrics.serviceMonitor.labels | object | `{}` | Assign additional labels according to Prometheus' serviceMonitorSelector matching labels |
| autoscaler.metrics.serviceMonitor.matchLabels | object | `{}` | Change matching labels |
| autoscaler.metrics.serviceMonitor.namespace | string | `""` | Install the ServiceMonitor into a different Namespace, as the monitoring stack one (default: the release one) |
| autoscaler.metrics.serviceMonitor.targetLabels | list | `[]` | Set targetLabels for the serviceMonitor |

## GitOps Values

---

Available Values for the [Gitops component](#gitops).

| autoscaler.metrics.serviceMonitor.targetLabels | list | `[]` | Set targetLabels for the serviceMonitor |
42 changes: 1 addition & 41 deletions charts/vcluster/README.md.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,6 @@ Based on [Cluster Autoscaler](https://github.com/kubernetes/autoscaler).
Allows to scale Kubernetes clusters based on the number of pods and nodes.
The component is deployed as a single deployment with a `controller` container. Since it's deployed on a hosting cluster, it's possible to downscale workers to zero and scale up again.

## GitOps



# Guides


Expand All @@ -89,35 +85,6 @@ The component is deployed as a single deployment with a `controller` container.



## ArgoCD Access


### Forwards the ArgoCD UI to your local machine

We must forward the ArgoCD within the new cluster in the kubectl client.
You can access the ArgoCD UI by running the following command:

```bash
# Execute Kubectl Container
kubectl exec -it test-cluster-kubectl sh -n machine-controller2

# Extract Admin Password
kubectl get secret -n argocd argocd-initial-admin-secret -o jsonpath='{.data.password}' | base64 -d

# Forward ArgoCD UI
kubectl port-forward svc/argocd-server 8080:80 -n argocd
```

Open second terminal and run the following command:

```bash
kubectl port-forward pod/test-cluster-kubectl 9191:8080 -n machine-controller2
```

Access the ArgoCD UI by opening [http://localhost:9191]( http://localhost:9191) in your browser. Login with `admin` and previously extract password.



# Values

{{- define "table.heading" }}
Expand Down Expand Up @@ -434,11 +401,4 @@ Available Values for the [Autsocaler component](#autoscaler).
{{- if and (hasPrefix "autoscaler." .Key) (contains "metrics" .Key) }}
| {{ .Key }} | {{ .Type }} | {{ if .Default }}{{ .Default }}{{ else }}{{ .AutoDefault }}{{ end }} | {{ if .Description }}{{ .Description }}{{ else }}{{ .AutoDescription }}{{ end }} |
{{- end }}
{{- end }}

## GitOps Values

---

Available Values for the [Gitops component](#gitops).

{{- end }}
17 changes: 1 addition & 16 deletions charts/vcluster/addons/scripts/configure-current.sh
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
{{- $manifest := $.Values.gitops -}}
{{- $argocd := $manifest.argocd -}}
{{- $lifecycle := $.Values.lifecycle -}}
#!/bin/bash

# ------------------------------------------------------------------------------
# Functions
# ------------------------------------------------------------------------------
{{- include "gitops.converter.script.functions" $ | nindent 0 }}

# ------------------------------------------------------------------------------
# GitOps Setup
# ------------------------------------------------------------------------------
{{- include "pkg.functions.kubernetes" $ | nindent 0 }}

# -- Convert Kubeconfigs

Expand All @@ -22,15 +16,6 @@ C_CERT=$(base64 /pki/admin-client/tls.crt | tr -d '\n')
C_KEY=$(base64 /pki/admin-client/tls.key | tr -d '\n')

{{- $kubeconfigs := $.Values.lifecycle.kubeconfigs }}

{{- if (include "gitops.enabled" $) }}{{"\n"}}
{{/* Add Default Flux Kubeconfig */}}
{{- $kubeconfigs = append $kubeconfigs (dict "name" (include "gitops.converter.flux.secretName" $) "key" (include "gitops.converter.secretKey" $)) }}

{{/* Add Default Argo Kubeconfig */}}
{{- $kubeconfigs = append $kubeconfigs (dict "name" (include "gitops.converter.argocd.secretName" $) "type" "argo") }}
{{- end -}}{{"\n"}}

# Iterate over all kubeconfigs
{{- range $kubeconfigs }}{{"\n"}}
{{- $name := (include "pkg.utils.template" (dict "tpl" (required "kubeconfig.name is required" .name) "ctx" $)) -}}
Expand Down
3 changes: 1 addition & 2 deletions charts/vcluster/addons/scripts/configure-vcluster.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{{- $kubernetes := $.Values.kubernetes -}}
{{- $fullName := include "kubernetes.fullname" . -}}
{{- $lifecycle := $.Values.lifecycle -}}
{{- $argocd := $.Values.gitops.argocd -}}
#!/bin/bash
ENDPOINT=$(awk -F'[ "]+' '$1 == "controlPlaneEndpoint:" {print $2}' /config/kubeadmcfg.yaml)
# Decrypt Cert Data to Base64
Expand All @@ -12,7 +11,7 @@ C_KEY=$(base64 /pki/admin-client/tls.key | tr -d '\n')
# ------------------------------------------------------------------------------
# Functions
# ------------------------------------------------------------------------------
{{- include "gitops.converter.script.functions" $ | nindent 0 }}
{{- include "pkg.functions.kubernetes" $ | nindent 0 }}

# ------------------------------------------------------------------------------
# Cluster configuration
Expand Down
2 changes: 0 additions & 2 deletions charts/vcluster/ci/kubeconfig-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ lifecycle:
type: argo
- endpoint: external
name: external-access
gitops:
enabled: false
osm:
enabled: false
kubernetes:
Expand Down
3 changes: 0 additions & 3 deletions charts/vcluster/ci/lifecycle-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ global:
topologySpreadConstraints: []

lifecycle:

jobs:
reconciler: true
labels:
Expand All @@ -57,8 +56,6 @@ lifecycle:
type: argo
- endpoint: external
name: external-access
gitops:
enabled: false
osm:
enabled: false
kubernetes:
Expand Down
2 changes: 0 additions & 2 deletions charts/vcluster/ci/scheduling-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,5 +64,3 @@ autoscaler:
maxReplicas: 5
targetCPUUtilizationPercentage: 80
targetMemoryUtilizationPercentage: 75


Loading

0 comments on commit 180ea26

Please sign in to comment.