Skip to content

Commit

Permalink
feat(kubevis): implemented initial working version
Browse files Browse the repository at this point in the history
  • Loading branch information
Mario-F committed Jul 12, 2021
1 parent 97a5c01 commit 753dced
Show file tree
Hide file tree
Showing 8 changed files with 47 additions and 85 deletions.
5 changes: 2 additions & 3 deletions charts/kubevis/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
apiVersion: v2
name: kubevis
description: A Helm chart for Kubernetes
description: Helm chart to kubevis https://github.com/Mario-F/kubevis
type: application
version: 1.0.1
appVersion: "v1.3.7"
version: 1.1.0
11 changes: 11 additions & 0 deletions charts/kubevis/README.md
Original file line number Diff line number Diff line change
@@ -1 +1,12 @@
# KubeVis Helm Chart

The helm chart to deploy kubevis <https://github.com/Mario-F/kubevis>

## Usage

Using the helm chart simple use the following commands:

```shell
helm repo add mariof-charts https://mario-f.github.io/helm-charts/
helm install kubevis mariof-charts/kubevis
```
6 changes: 3 additions & 3 deletions charts/kubevis/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ app.kubernetes.io/instance: {{ .Release.Name }}
Create the name of the service account to use
*/}}
{{- define "kubevis.serviceAccountName" -}}
{{- if .Values.serviceAccount.create }}
{{- default (include "kubevis.fullname" .) .Values.serviceAccount.name }}
{{- if .Values.clusterAdmin.enabled }}
{{- include "kubevis.fullname" . }}
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
"default"
{{- end }}
{{- end }}
13 changes: 3 additions & 10 deletions charts/kubevis/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
apiVersion: apps/v1
kind: kubevisment
kind: Deployment
metadata:
name: {{ include "kubevis.fullname" . }}
labels:
{{- include "kubevis.labels" . | nindent 4 }}
spec:
{{- if not .Values.autoscaling.enabled }}
replicas: {{ .Values.replicaCount }}
{{- end }}
selector:
matchLabels:
{{- include "kubevis.selectorLabels" . | nindent 6 }}
Expand All @@ -25,17 +22,13 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "kubevis.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
containers:
- name: {{ .Chart.Name }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- name: http
containerPort: 80
containerPort: 3000
protocol: TCP
livenessProbe:
httpGet:
Expand Down
28 changes: 0 additions & 28 deletions charts/kubevis/templates/hpa.yaml

This file was deleted.

23 changes: 23 additions & 0 deletions charts/kubevis/templates/rbac.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{{- if .Values.clusterAdmin.enabled -}}
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ include "kubevis.fullname" . }}
labels:
{{- include "kubevis.labels" . | nindent 4 }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: {{ include "kubevis.fullname" . }}
labels:
{{- include "kubevis.labels" . | nindent 4 }}
subjects:
- kind: ServiceAccount
name: {{ include "kubevis.fullname" . }}
namespace: {{ .Release.Namespace }}
roleRef:
kind: ClusterRole
name: cluster-admin
apiGroup: rbac.authorization.k8s.io
{{- end }}
12 changes: 0 additions & 12 deletions charts/kubevis/templates/serviceaccount.yaml

This file was deleted.

34 changes: 5 additions & 29 deletions charts/kubevis/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,37 +5,20 @@
replicaCount: 1

image:
repository: nginx
repository: ghcr.io/mario-f/kubevis
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
tag: ""
tag: v1.4.0

imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""

serviceAccount:
# Specifies whether a service account should be created
create: true
# Annotations to add to the service account
annotations: {}
# The name of the service account to use.
# If not set and create is true, a name is generated using the fullname template
name: ""
clusterAdmin:
# This will create and mount a serviceaccount with cluster-admin privileges
enabled: true

podAnnotations: {}

podSecurityContext: {}
# fsGroup: 2000

securityContext: {}
# capabilities:
# drop:
# - ALL
# readOnlyRootFilesystem: true
# runAsNonRoot: true
# runAsUser: 1000

service:
type: ClusterIP
port: 80
Expand Down Expand Up @@ -65,13 +48,6 @@ resources: {}
# cpu: 100m
# memory: 128Mi

autoscaling:
enabled: false
minReplicas: 1
maxReplicas: 100
targetCPUUtilizationPercentage: 80
# targetMemoryUtilizationPercentage: 80

nodeSelector: {}

tolerations: []
Expand Down

0 comments on commit 753dced

Please sign in to comment.