From 7b5344a35021736e909466504bccf2eb1a46aa1f Mon Sep 17 00:00:00 2001 From: Sanskar Bhushan Date: Sat, 24 Jun 2023 05:32:38 +0530 Subject: [PATCH] adding helm charts to install kspan Signed-off-by: Sanskar Bhushan --- config/kspan-chart/Chart.yaml | 4 +++ config/kspan-chart/templates/manager.yaml | 30 +++++++++++++++++++ .../kspan-chart/templates/role_binding.yaml | 27 +++++++++++++++++ config/kspan-chart/values.yaml | 12 ++++++++ 4 files changed, 73 insertions(+) create mode 100644 config/kspan-chart/Chart.yaml create mode 100644 config/kspan-chart/templates/manager.yaml create mode 100644 config/kspan-chart/templates/role_binding.yaml create mode 100644 config/kspan-chart/values.yaml diff --git a/config/kspan-chart/Chart.yaml b/config/kspan-chart/Chart.yaml new file mode 100644 index 0000000..cd55b5b --- /dev/null +++ b/config/kspan-chart/Chart.yaml @@ -0,0 +1,4 @@ +apiVersion: v2 +name: kspan-chart +version: 0.1.0 +description: A Helm chart for deploying the kspan application diff --git a/config/kspan-chart/templates/manager.yaml b/config/kspan-chart/templates/manager.yaml new file mode 100644 index 0000000..f314cdd --- /dev/null +++ b/config/kspan-chart/templates/manager.yaml @@ -0,0 +1,30 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: controller-manager + namespace: {{ .Release.Namespace }} + labels: + control-plane: controller-manager +spec: + selector: + matchLabels: + control-plane: controller-manager + replicas: 1 + template: + metadata: + labels: + control-plane: controller-manager + spec: + containers: + - command: + - /manager + args: + - --otlp-addr=otel-collector.default:4317 + image: {{ .Values.image.repository }}:{{ .Values.image.tag }} + name: manager + resources: + limits: {{ .Values.resources.limits | toYaml | nindent 12 }} + requests: {{ .Values.resources.requests | toYaml | nindent 12 }} + terminationGracePeriodSeconds: 10 + serviceAccountName: kspan + automountServiceAccountToken: true diff --git a/config/kspan-chart/templates/role_binding.yaml b/config/kspan-chart/templates/role_binding.yaml new file mode 100644 index 0000000..9b2cdef --- /dev/null +++ b/config/kspan-chart/templates/role_binding.yaml @@ -0,0 +1,27 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kspan + namespace: {{ .Release.Namespace }} +rules: + - apiGroups: + - "*" + resources: + - "*" + verbs: + - "*" + +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: kspan + namespace: {{ .Release.Namespace }} +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: kspan +subjects: +- kind: ServiceAccount + name: kspan + namespace: {{ .Release.Namespace }} diff --git a/config/kspan-chart/values.yaml b/config/kspan-chart/values.yaml new file mode 100644 index 0000000..ed0d9fd --- /dev/null +++ b/config/kspan-chart/values.yaml @@ -0,0 +1,12 @@ +# Default values for kspan-chart. +image: + repository: weaveworks/kspan + tag: main-12eefbe6 + +resources: + limits: + cpu: 100m + memory: 30Mi + requests: + cpu: 100m + memory: 20Mi