From 77ccfa1a80e5881dbb01c9f716c7592e232f099b Mon Sep 17 00:00:00 2001 From: Vedant Pareek Date: Mon, 15 May 2023 10:17:08 +0530 Subject: [PATCH 1/7] Added tfy-agent --- charts/tfy-agent/Chart.yaml | 6 + charts/tfy-agent/templates/_helpers.tpl | 129 ++++++++++++++++++ .../templates/clusterrolebinding.yaml | 14 ++ .../templates/deployment-tfy-agent-proxy.yaml | 30 ++++ charts/tfy-agent/templates/deployment.yaml | 59 ++++++++ .../templates/image-pull-secret.yaml | 10 ++ charts/tfy-agent/templates/ingress.yaml | 39 ++++++ charts/tfy-agent/templates/service.yaml | 15 ++ .../tfy-agent/templates/serviceaccount.yaml | 16 +++ .../tfy-agent/templates/virtualservice.yaml | 32 +++++ charts/tfy-agent/values.yaml | 86 ++++++++++++ 11 files changed, 436 insertions(+) create mode 100644 charts/tfy-agent/Chart.yaml create mode 100644 charts/tfy-agent/templates/_helpers.tpl create mode 100644 charts/tfy-agent/templates/clusterrolebinding.yaml create mode 100644 charts/tfy-agent/templates/deployment-tfy-agent-proxy.yaml create mode 100644 charts/tfy-agent/templates/deployment.yaml create mode 100644 charts/tfy-agent/templates/image-pull-secret.yaml create mode 100644 charts/tfy-agent/templates/ingress.yaml create mode 100644 charts/tfy-agent/templates/service.yaml create mode 100644 charts/tfy-agent/templates/serviceaccount.yaml create mode 100644 charts/tfy-agent/templates/virtualservice.yaml create mode 100644 charts/tfy-agent/values.yaml diff --git a/charts/tfy-agent/Chart.yaml b/charts/tfy-agent/Chart.yaml new file mode 100644 index 000000000..fd181602b --- /dev/null +++ b/charts/tfy-agent/Chart.yaml @@ -0,0 +1,6 @@ +apiVersion: v2 +name: tfy-agent +version: 0.1.0 +description: "Truefoundry agent for kubernetes clusters" +maintainers: + - name: truefoundry diff --git a/charts/tfy-agent/templates/_helpers.tpl b/charts/tfy-agent/templates/_helpers.tpl new file mode 100644 index 000000000..fb6a83bb5 --- /dev/null +++ b/charts/tfy-agent/templates/_helpers.tpl @@ -0,0 +1,129 @@ +{{/* +Expand the name of the chart. +*/}} +{{- define "app.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* + Create a default fully qualified app name. + We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). + If release name contains chart name it will be used as a full name. + */}} +{{- define "app.fullname" -}} +{{- if .Values.fullnameOverride }} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- $name := default .Chart.Name .Values.nameOverride }} +{{- if contains $name .Release.Name }} +{{- .Release.Name | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} +{{- end }} +{{- end }} +{{- end }} + +{{/* +Define full name for tfy-agent-proxy +*/}} +{{- define "app.tfyAgentProxy.fullname" -}} +{{- include "app.fullname" . | trunc 57 | trimSuffix "-" }}-proxy +{{- end }} + +{{/* + Create chart name and version as used by the chart label. + */}} +{{- define "app.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* + Common labels + */}} +{{- define "app.labels" -}} +helm.sh/chart: {{ include "app.chart" . }} +{{ include "app.selectorLabels" . }} +{{- if .Values.imageTag }} +app.kubernetes.io/version: {{ .Values.imageTag | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end }} + +{{/* + Selector labels + */}} +{{- define "app.selectorLabels" -}} +app.kubernetes.io/name: {{ include "app.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end }} + +{{/* + Create the name of the service account to use + */}} +{{- define "app.serviceAccountName" -}} +{{- if .Values.serviceAccount.create }} +{{- default (include "app.fullname" .) .Values.serviceAccount.name }} +{{- else }} +{{- default "default" .Values.serviceAccount.name }} +{{- end }} +{{- end }} + +{{/* + Parse env from template + */}} +{{- define "app.parseEnv" -}} +{{ tpl (.Values.env | toYaml) . }} +{{- end }} + + +{{/* + Create the env file + */}} +{{- define "app.env" }} +{{- range $key, $val := (include "app.parseEnv" .) | fromYaml }} +{{- if and $val (contains "${k8s-secret" ($val | toString)) }} +- name: {{ $key }} + valueFrom: + secretKeyRef: + name: {{ $.Values.envSecretName }} + key: {{ $val | trimPrefix "${k8s-secret/" | trimSuffix "}" }} +{{- else }} +- name: {{ $key }} + value: {{ $val | quote }} +{{- end }} +{{- end }} +{{- end }} + +{{/* + Parse env from template + */}} +{{- define "app.tfyAgentProxy.parseEnv" -}} +{{ tpl (.Values.tfyAgentProxy.env | toYaml) . }} +{{- end }} + +{{/* + Create the env file + */}} +{{- define "app.tfyAgentProxy.env" }} +{{- range $key, $val := (include "app.tfyAgentProxy.parseEnv" .) | fromYaml }} +{{- if and $val (contains "${k8s-secret" ($val | toString)) }} +- name: {{ $key }} + valueFrom: + secretKeyRef: + name: {{ $.Values.envSecretName }} + key: {{ $val | trimPrefix "${k8s-secret/" | trimSuffix "}" }} +{{- else }} +- name: {{ $key }} + value: {{ $val | quote }} +{{- end }} +{{- end }} +{{- end }} + +{{- define "app.imagePullSecrets" }} +{{- if (tpl .Values.imagePullCredentials .) }} +- name: {{ include "app.fullname" . }}-image-pull-secret +{{- end }} +{{- if (tpl .Values.imagePullSecretName .) }} +- name: {{ tpl .Values.imagePullSecretName . }} +{{- end }} +{{- end }} diff --git a/charts/tfy-agent/templates/clusterrolebinding.yaml b/charts/tfy-agent/templates/clusterrolebinding.yaml new file mode 100644 index 000000000..ba81d187f --- /dev/null +++ b/charts/tfy-agent/templates/clusterrolebinding.yaml @@ -0,0 +1,14 @@ +{{- if .Values.rbac.enabled -}} +kind: ClusterRoleBinding +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: {{ include "app.fullname" . }}-admin-rbac +subjects: + - kind: ServiceAccount + name: {{ include "app.serviceAccountName" . }} + namespace: {{ .Release.Namespace }} +roleRef: + kind: ClusterRole + name: cluster-admin + apiGroup: rbac.authorization.k8s.io +{{- end }} diff --git a/charts/tfy-agent/templates/deployment-tfy-agent-proxy.yaml b/charts/tfy-agent/templates/deployment-tfy-agent-proxy.yaml new file mode 100644 index 000000000..003c992fc --- /dev/null +++ b/charts/tfy-agent/templates/deployment-tfy-agent-proxy.yaml @@ -0,0 +1,30 @@ +{{- if .Values.tfyAgentProxy.enabled }} +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "app.tfyAgentProxy.fullname" . }} + labels: + app.kubernetes.io/version: {{ .Values.tfyAgentProxy.imageTag | quote }} + app.kubernetes.io/managed-by: {{ .Release.Service }} + helm.sh/chart: {{ include "app.chart" . }} + app.kubernetes.io/name: tfy-agent-proxy +spec: + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/name: {{ include "app.tfyAgentProxy.fullname" . }} + template: + metadata: + labels: + app.kubernetes.io/name: {{ include "app.tfyAgentProxy.fullname" . }} + spec: + serviceAccountName: {{ include "app.serviceAccountName" . }} + containers: + - name: tfy-agent-proxy + env: + {{- include "app.tfyAgentProxy.env" . | trim | nindent 12 }} + image: "{{ .Values.tfyAgentProxy.imageRepository }}:{{ .Values.tfyAgentProxy.imageTag }}" + imagePullPolicy: IfNotPresent + resources: + {{- toYaml .Values.tfyAgentProxy.resources | nindent 12 }} +{{- end }} diff --git a/charts/tfy-agent/templates/deployment.yaml b/charts/tfy-agent/templates/deployment.yaml new file mode 100644 index 000000000..85feb992a --- /dev/null +++ b/charts/tfy-agent/templates/deployment.yaml @@ -0,0 +1,59 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "app.fullname" . }} + labels: + {{- include "app.labels" . | nindent 4 }} +spec: + replicas: 1 + selector: + matchLabels: + {{- include "app.selectorLabels" . | nindent 6 }} + template: + metadata: + {{- with .Values.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + {{- include "app.selectorLabels" . | nindent 8 }} + spec: + serviceAccountName: {{ include "app.serviceAccountName" . }} + securityContext: + {{- toYaml .Values.podSecurityContext | nindent 8 }} + containers: + - name: {{ .Chart.Name }} + securityContext: + {{- toYaml .Values.securityContext | nindent 12 }} + env: + {{- include "app.env" . | trim | nindent 12 }} + image: "{{ .Values.imageRepository }}:{{ .Values.imageTag }}" + imagePullPolicy: {{ .Values.imagePullPolicy }} + ports: + - name: http + containerPort: {{ .Values.service.port }} + protocol: TCP + resources: + {{- toYaml .Values.resources | nindent 12 }} + {{- if .Values.healthcheck.enabled }} + livenessProbe: + httpGet: + path: {{ .Values.healthcheck.liveness.path }} + port: {{ .Values.healthcheck.liveness.port }} + readinessProbe: + httpGet: + path: {{ .Values.healthcheck.readiness.path }} + port: {{ .Values.healthcheck.liveness.port }} + {{- end }} + {{- with .Values.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} \ No newline at end of file diff --git a/charts/tfy-agent/templates/image-pull-secret.yaml b/charts/tfy-agent/templates/image-pull-secret.yaml new file mode 100644 index 000000000..4f1cc3ed9 --- /dev/null +++ b/charts/tfy-agent/templates/image-pull-secret.yaml @@ -0,0 +1,10 @@ +# {{- if (tpl .Values.imagePullCredentials .) -}} +# apiVersion: v1 +# data: +# .dockerconfigjson: {{ tpl .Values.imagePullCredentials . }} +# kind: Secret +# metadata: +# name: {{ include "app.fullname" . }}-image-pull-secret +# namespace: {{ .Release.Namespace }} +# type: kubernetes.io/dockerconfigjson +# {{- end }} \ No newline at end of file diff --git a/charts/tfy-agent/templates/ingress.yaml b/charts/tfy-agent/templates/ingress.yaml new file mode 100644 index 000000000..1fe0c59d1 --- /dev/null +++ b/charts/tfy-agent/templates/ingress.yaml @@ -0,0 +1,39 @@ +{{- if .Values.ingress.enabled -}} +{{- $serviceName := include "app.fullname" . -}} +{{- $servicePort := .Values.service.port -}} +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: +{{- if .Values.ingress.annotations }} + annotations: + {{- range $key, $value := .Values.ingress.annotations }} + {{ $key }}: {{ $value | quote }} + {{- end }} +{{- end }} + name: {{ include "app.fullname" . }} + labels: + {{- include "app.labels" . | nindent 4 }} + {{- if .Values.ingress.labels }} + {{- toYaml .Values.ingress.labels | nindent 4 }} + {{- end }} +spec: + ingressClassName: {{ .Values.ingress.ingressClassName }} + rules: + {{- range $host := .Values.ingress.hosts }} + - host: {{ $host }} + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: {{ $serviceName }} + port: + number: {{ $servicePort }} + + {{- end -}} + {{- if .Values.ingress.tls }} + tls: + {{- toYaml .Values.ingress.tls | nindent 4 }} + {{- end -}} +{{- end -}} diff --git a/charts/tfy-agent/templates/service.yaml b/charts/tfy-agent/templates/service.yaml new file mode 100644 index 000000000..a45d8822d --- /dev/null +++ b/charts/tfy-agent/templates/service.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "app.fullname" . }} + labels: + {{- include "app.labels" . | nindent 4 }} +spec: + type: {{ .Values.service.type }} + ports: + - port: {{ .Values.service.port }} + targetPort: {{ .Values.service.port }} + protocol: TCP + name: http + selector: + {{- include "app.selectorLabels" . | nindent 4 }} \ No newline at end of file diff --git a/charts/tfy-agent/templates/serviceaccount.yaml b/charts/tfy-agent/templates/serviceaccount.yaml new file mode 100644 index 000000000..726f0b071 --- /dev/null +++ b/charts/tfy-agent/templates/serviceaccount.yaml @@ -0,0 +1,16 @@ +{{- if .Values.serviceAccount.create -}} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ include "app.serviceAccountName" . }} + labels: + {{- include "app.labels" . | nindent 4 }} +{{- with .Values.serviceAccount.annotations }} + annotations: +{{ tpl (toYaml . | indent 4) $ }} +{{- end }} +{{- if (include "app.imagePullSecrets" .) }} +imagePullSecrets: + {{- include "app.imagePullSecrets" . | trim | nindent 2 }} +{{- end }} +{{- end }} diff --git a/charts/tfy-agent/templates/virtualservice.yaml b/charts/tfy-agent/templates/virtualservice.yaml new file mode 100644 index 000000000..b220274cb --- /dev/null +++ b/charts/tfy-agent/templates/virtualservice.yaml @@ -0,0 +1,32 @@ +{{- if .Values.istio.virtualservice.enabled -}} +{{- $serviceName := include "app.fullname" . -}} +{{- $servicePort := .Values.service.port -}} +apiVersion: networking.istio.io/v1beta1 +kind: VirtualService +metadata: + name: {{ include "app.fullname" . }} + labels: + {{- include "app.labels" . | nindent 4 }} + {{- if .Values.istio.virtualservice.annotations }} + annotations: + {{- range $key, $value := .Values.istio.virtualservice.annotations }} + {{ $key }}: {{ $value | quote }} + {{- end }} + {{- end }} + namespace: {{ .Release.Namespace }} +spec: + gateways: + {{- range .Values.istio.virtualservice.gateways}} + - {{ . }} + {{- end }} + hosts: + {{- range .Values.istio.virtualservice.hosts}} + - {{ . }} + {{- end }} + http: + - route: + - destination: + host: {{ include "app.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local + port: + number: {{ .Values.service.port }} +{{- end }} \ No newline at end of file diff --git a/charts/tfy-agent/values.yaml b/charts/tfy-agent/values.yaml new file mode 100644 index 000000000..b963023da --- /dev/null +++ b/charts/tfy-agent/values.yaml @@ -0,0 +1,86 @@ +global: {} +imageRepository: truefoundrycloud/tfy-agent +imagePullPolicy: IfNotPresent +envSecretName: tfy-agent-env-secret +# imagePullCredentials: '{{ .Values.global.imagePullCredentials }}' +# imagePullSecretName: '{{ .Values.global.imagePullSecretName }}' +imagePullSecrets: [] +nameOverride: '' +fullnameOverride: '' +podAnnotations: {} +podSecurityContext: {} +securityContext: {} +healthcheck: + enabled: true + readiness: + port: 3000 + path: / + liveness: + port: 3000 + path: / +resources: + limits: + cpu: 200m + memory: 512Mi + ephemeral-storage: 256Mi + requests: + cpu: 100m + memory: 300Mi + ephemeral-storage: 128Mi +nodeSelector: {} +tolerations: {} +affinity: {} +ingress: + enabled: false + annotations: {} + labels: {} + ingressClassName: istio + tls: [] + hosts: [] +istio: + virtualservice: + enabled: false + annotations: {} + gateways: [] + hosts: [] +service: + type: ClusterIP + port: 3000 + annotations: {} +serviceAccount: + create: true + name: tfy-agent + annotations: {} +rbac: + enabled: true +name: tfy-agent +imageTag: b1634362e72e43a63bcfb735249977e5a6f28b9a +env: + NODE_ENV: production + PROMETHEUS_POLL_INTERVAL: '60000' + PROMETHEUS_ENDPOINT: http://prometheus-operated.prometheus.svc.cluster.local:9090 + OPENCOST_POLL_INTERVAL: '180000' + OPENCOST_ENDPOINT: http://opencost.opencost.svc.cluster.local:9090 + CONTROL_PLANE_URL: '{{ .Values.global.controlPlaneURL }}' + CLUSTER_TOKEN: ${k8s-secret/CLUSTER_TOKEN} + TENANT_NAME: '{{ .Values.global.tenantName }}' + WORKLOAD_NAMESPACE: '{{ .Release.Namespace }}' + CONTROL_PLANE_NATS_PORT: '443' + ALERT_URL: https://auth.truefoundry.com +tfyAgentProxy: + enabled: true + imageTag: 987c2e9442de1814f1601cf726cc9c997fea8433 + imageRepository: truefoundrycloud/tfy-agent-proxy + type: ClusterIP + resources: + limits: + cpu: '1' + ephemeral-storage: 500M + memory: 500M + requests: + cpu: 50m + ephemeral-storage: 200M + memory: 100M + env: + CONTROL_PLANE_URL: '{{ .Values.global.controlPlaneURL }}' + CLUSTER_TOKEN: ${k8s-secret/CLUSTER_TOKEN} From 37aa9d7660979173169d93348a17a10b86f40cb9 Mon Sep 17 00:00:00 2001 From: Vedant Pareek Date: Mon, 15 May 2023 11:25:12 +0530 Subject: [PATCH 2/7] Removed image pull secrets --- charts/tfy-agent/templates/_helpers.tpl | 16 ++-- charts/tfy-agent/templates/deployment.yaml | 8 +- .../templates/image-pull-secret.yaml | 10 -- .../tfy-agent/templates/serviceaccount.yaml | 4 - charts/tfy-agent/values.yaml | 96 +++++++++++++------ 5 files changed, 79 insertions(+), 55 deletions(-) delete mode 100644 charts/tfy-agent/templates/image-pull-secret.yaml diff --git a/charts/tfy-agent/templates/_helpers.tpl b/charts/tfy-agent/templates/_helpers.tpl index fb6a83bb5..b8904d8e0 100644 --- a/charts/tfy-agent/templates/_helpers.tpl +++ b/charts/tfy-agent/templates/_helpers.tpl @@ -119,11 +119,11 @@ app.kubernetes.io/instance: {{ .Release.Name }} {{- end }} {{- end }} -{{- define "app.imagePullSecrets" }} -{{- if (tpl .Values.imagePullCredentials .) }} -- name: {{ include "app.fullname" . }}-image-pull-secret -{{- end }} -{{- if (tpl .Values.imagePullSecretName .) }} -- name: {{ tpl .Values.imagePullSecretName . }} -{{- end }} -{{- end }} +# {{- define "app.imagePullSecrets" }} +# {{- if (tpl .Values.imagePullCredentials .) }} +# - name: {{ include "app.fullname" . }}-image-pull-secret +# {{- end }} +# {{- if (tpl .Values.imagePullSecretName .) }} +# - name: {{ tpl .Values.imagePullSecretName . }} +# {{- end }} +# {{- end }} diff --git a/charts/tfy-agent/templates/deployment.yaml b/charts/tfy-agent/templates/deployment.yaml index 85feb992a..4ee9cd45d 100644 --- a/charts/tfy-agent/templates/deployment.yaml +++ b/charts/tfy-agent/templates/deployment.yaml @@ -18,6 +18,10 @@ spec: labels: {{- include "app.selectorLabels" . | nindent 8 }} spec: + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} serviceAccountName: {{ include "app.serviceAccountName" . }} securityContext: {{- toYaml .Values.podSecurityContext | nindent 8 }} @@ -27,8 +31,8 @@ spec: {{- toYaml .Values.securityContext | nindent 12 }} env: {{- include "app.env" . | trim | nindent 12 }} - image: "{{ .Values.imageRepository }}:{{ .Values.imageTag }}" - imagePullPolicy: {{ .Values.imagePullPolicy }} + image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} ports: - name: http containerPort: {{ .Values.service.port }} diff --git a/charts/tfy-agent/templates/image-pull-secret.yaml b/charts/tfy-agent/templates/image-pull-secret.yaml deleted file mode 100644 index 4f1cc3ed9..000000000 --- a/charts/tfy-agent/templates/image-pull-secret.yaml +++ /dev/null @@ -1,10 +0,0 @@ -# {{- if (tpl .Values.imagePullCredentials .) -}} -# apiVersion: v1 -# data: -# .dockerconfigjson: {{ tpl .Values.imagePullCredentials . }} -# kind: Secret -# metadata: -# name: {{ include "app.fullname" . }}-image-pull-secret -# namespace: {{ .Release.Namespace }} -# type: kubernetes.io/dockerconfigjson -# {{- end }} \ No newline at end of file diff --git a/charts/tfy-agent/templates/serviceaccount.yaml b/charts/tfy-agent/templates/serviceaccount.yaml index 726f0b071..2519605b9 100644 --- a/charts/tfy-agent/templates/serviceaccount.yaml +++ b/charts/tfy-agent/templates/serviceaccount.yaml @@ -9,8 +9,4 @@ metadata: annotations: {{ tpl (toYaml . | indent 4) $ }} {{- end }} -{{- if (include "app.imagePullSecrets" .) }} -imagePullSecrets: - {{- include "app.imagePullSecrets" . | trim | nindent 2 }} -{{- end }} {{- end }} diff --git a/charts/tfy-agent/values.yaml b/charts/tfy-agent/values.yaml index b963023da..4096dab49 100644 --- a/charts/tfy-agent/values.yaml +++ b/charts/tfy-agent/values.yaml @@ -1,23 +1,57 @@ +# Default values for sample. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + global: {} -imageRepository: truefoundrycloud/tfy-agent -imagePullPolicy: IfNotPresent -envSecretName: tfy-agent-env-secret -# imagePullCredentials: '{{ .Values.global.imagePullCredentials }}' -# imagePullSecretName: '{{ .Values.global.imagePullSecretName }}' + +image: + repository: truefoundrycloud/tfy-agent + pullPolicy: IfNotPresent + # Overrides the image tag whose default is the chart appVersion. + tag: "b1634362e72e43a63bcfb735249977e5a6f28b9a" + imagePullSecrets: [] -nameOverride: '' -fullnameOverride: '' +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: "tfy-agent" + + +envSecretName: tfy-agent-env-secret podAnnotations: {} + podSecurityContext: {} + # fsGroup: 2000 + securityContext: {} -healthcheck: - enabled: true - readiness: - port: 3000 - path: / - liveness: - port: 3000 - path: / + # capabilities: + # drop: + # - ALL + # readOnlyRootFilesystem: true + # runAsNonRoot: true + # runAsUser: 1000 + +service: + type: ClusterIP + port: 3000 + annotations: {} + + +ingress: + enabled: false + annotations: {} + labels: {} + ingressClassName: istio + tls: [] + hosts: [] + resources: limits: cpu: 200m @@ -27,34 +61,33 @@ resources: cpu: 100m memory: 300Mi ephemeral-storage: 128Mi + + +healthcheck: + enabled: true + readiness: + port: 3000 + path: / + liveness: + port: 3000 + path: / + nodeSelector: {} tolerations: {} affinity: {} -ingress: - enabled: false - annotations: {} - labels: {} - ingressClassName: istio - tls: [] - hosts: [] + istio: virtualservice: enabled: false annotations: {} gateways: [] hosts: [] -service: - type: ClusterIP - port: 3000 - annotations: {} -serviceAccount: - create: true - name: tfy-agent - annotations: {} + rbac: enabled: true + name: tfy-agent -imageTag: b1634362e72e43a63bcfb735249977e5a6f28b9a + env: NODE_ENV: production PROMETHEUS_POLL_INTERVAL: '60000' @@ -67,6 +100,7 @@ env: WORKLOAD_NAMESPACE: '{{ .Release.Namespace }}' CONTROL_PLANE_NATS_PORT: '443' ALERT_URL: https://auth.truefoundry.com + tfyAgentProxy: enabled: true imageTag: 987c2e9442de1814f1601cf726cc9c997fea8433 From 8d0372a8cb3ff4775218cbeca20ebf3c5a896228 Mon Sep 17 00:00:00 2001 From: Vedant Pareek Date: Mon, 15 May 2023 11:25:28 +0530 Subject: [PATCH 3/7] Modified values.yaml --- charts/tfy-agent/values.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/charts/tfy-agent/values.yaml b/charts/tfy-agent/values.yaml index 4096dab49..e0078b3bf 100644 --- a/charts/tfy-agent/values.yaml +++ b/charts/tfy-agent/values.yaml @@ -102,10 +102,13 @@ env: ALERT_URL: https://auth.truefoundry.com tfyAgentProxy: + # specifies if agent proxy should be enabled or not enabled: true imageTag: 987c2e9442de1814f1601cf726cc9c997fea8433 imageRepository: truefoundrycloud/tfy-agent-proxy type: ClusterIP + + # resource section for tfy agent proxy resources: limits: cpu: '1' @@ -115,6 +118,8 @@ tfyAgentProxy: cpu: 50m ephemeral-storage: 200M memory: 100M + + # env variabled to pass to tfy agent proxy env: CONTROL_PLANE_URL: '{{ .Values.global.controlPlaneURL }}' CLUSTER_TOKEN: ${k8s-secret/CLUSTER_TOKEN} From 1db5fe46a1c8fe7ae1bd542d36424179719b3ba8 Mon Sep 17 00:00:00 2001 From: Vedant Pareek Date: Mon, 15 May 2023 11:44:25 +0530 Subject: [PATCH 4/7] Updated tfy-agent-proxy image --- charts/tfy-agent/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/tfy-agent/values.yaml b/charts/tfy-agent/values.yaml index e0078b3bf..a8afcdcc5 100644 --- a/charts/tfy-agent/values.yaml +++ b/charts/tfy-agent/values.yaml @@ -104,7 +104,7 @@ env: tfyAgentProxy: # specifies if agent proxy should be enabled or not enabled: true - imageTag: 987c2e9442de1814f1601cf726cc9c997fea8433 + imageTag: 00f2e71680781ab9e1e64270525b97d01e0ba236 imageRepository: truefoundrycloud/tfy-agent-proxy type: ClusterIP From 3e1dcc0046d3517c267f6eb27441f29da9b1e1e7 Mon Sep 17 00:00:00 2001 From: Vedant Pareek Date: Mon, 15 May 2023 11:55:12 +0530 Subject: [PATCH 5/7] Modified tag for tfy-agent --- charts/tfy-agent/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/tfy-agent/values.yaml b/charts/tfy-agent/values.yaml index a8afcdcc5..8c8ca5446 100644 --- a/charts/tfy-agent/values.yaml +++ b/charts/tfy-agent/values.yaml @@ -8,7 +8,7 @@ image: repository: truefoundrycloud/tfy-agent pullPolicy: IfNotPresent # Overrides the image tag whose default is the chart appVersion. - tag: "b1634362e72e43a63bcfb735249977e5a6f28b9a" + tag: "38ca779a56bc903df76760f397e53a91b26bc67d" imagePullSecrets: [] nameOverride: "" From 0dbae6f265f84c0631e49cdb91265b8088dd9eec Mon Sep 17 00:00:00 2001 From: opsved <127525098+opsved@users.noreply.github.com> Date: Tue, 16 May 2023 23:59:24 +0530 Subject: [PATCH 6/7] Update values.yaml --- charts/tfy-agent/values.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/tfy-agent/values.yaml b/charts/tfy-agent/values.yaml index 8c8ca5446..fff35fd1f 100644 --- a/charts/tfy-agent/values.yaml +++ b/charts/tfy-agent/values.yaml @@ -8,7 +8,7 @@ image: repository: truefoundrycloud/tfy-agent pullPolicy: IfNotPresent # Overrides the image tag whose default is the chart appVersion. - tag: "38ca779a56bc903df76760f397e53a91b26bc67d" + tag: "4c0ca0a13b934f81f49ad41a39d3f1e86476511b" imagePullSecrets: [] nameOverride: "" @@ -104,7 +104,7 @@ env: tfyAgentProxy: # specifies if agent proxy should be enabled or not enabled: true - imageTag: 00f2e71680781ab9e1e64270525b97d01e0ba236 + imageTag: "987c2e9442de1814f1601cf726cc9c997fea8433" imageRepository: truefoundrycloud/tfy-agent-proxy type: ClusterIP From b099f847cc30eb39b15dd1fc17b2adc8f40287f6 Mon Sep 17 00:00:00 2001 From: opsved <127525098+opsved@users.noreply.github.com> Date: Wed, 17 May 2023 00:02:35 +0530 Subject: [PATCH 7/7] Update values.yaml --- charts/tfy-agent/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/tfy-agent/values.yaml b/charts/tfy-agent/values.yaml index fff35fd1f..d86a277eb 100644 --- a/charts/tfy-agent/values.yaml +++ b/charts/tfy-agent/values.yaml @@ -104,7 +104,7 @@ env: tfyAgentProxy: # specifies if agent proxy should be enabled or not enabled: true - imageTag: "987c2e9442de1814f1601cf726cc9c997fea8433" + imageTag: "00f2e71680781ab9e1e64270525b97d01e0ba236" imageRepository: truefoundrycloud/tfy-agent-proxy type: ClusterIP