diff --git a/charts/konnectivity-agent/Chart.yaml b/charts/konnectivity-agent/Chart.yaml index 6fe3e16..d6000fe 100644 --- a/charts/konnectivity-agent/Chart.yaml +++ b/charts/konnectivity-agent/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: konnectivity-agent -description: Helm Chart for deploying the konnectivity agent. +description: Helm Chart for deploying the konnectivity agent, plus server RBAC. type: application home: https://github.com/syself/charts/tree/main/charts/konnectivity-agent maintainers: @@ -11,7 +11,7 @@ dependencies: - name: cluster-proportional-autoscaler repository: https://kubernetes-sigs.github.io/cluster-proportional-autoscaler version: 1.1.0 + appVersion: 1.8.6 alias: proportional-autoscaler condition: proportional-autoscaler.enabled -appVersion: v1.8.9 -version: 1.0.12 +version: 2.0.0 diff --git a/charts/konnectivity-agent/templates/server-serviceMonitor.yaml b/charts/konnectivity-agent/templates/server-serviceMonitor.yaml deleted file mode 100644 index 46a873f..0000000 --- a/charts/konnectivity-agent/templates/server-serviceMonitor.yaml +++ /dev/null @@ -1,38 +0,0 @@ -{{- if .Values.server.serviceMonitor.enabled }} -apiVersion: monitoring.coreos.com/v1 -kind: ServiceMonitor -metadata: - name: konnectivity-server - namespace: {{ .Release.Namespace }} - labels: -{{ include "konnectivity-server.labels" . | indent 4 }} -{{- if .Values.server.serviceMonitor.extraLabels }} -{{ toYaml .Values.server.serviceMonitor.extraLabels | indent 4 }} -{{- end }} -spec: - jobLabel: jobLabel - selector: - matchLabels: -{{ include "konnectivity-server.selectorLabels" . | indent 6}} - namespaceSelector: - matchNames: - - {{ .Release.Namespace }} - endpoints: - - port: http-metrics - path: /metrics - {{- if .Values.server.serviceMonitor.interval}} - interval: {{ .Values.server.serviceMonitor.interval }} - {{- end }} - {{- if .Values.server.serviceMonitor.proxyUrl }} - proxyUrl: {{ .Values.server.serviceMonitor.proxyUrl}} - {{- end }} - bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token -{{- if .Values.server.serviceMonitor.metricRelabelings }} - metricRelabelings: -{{ tpl (toYaml .Values.server.serviceMonitor.metricRelabelings | indent 4) . }} -{{- end }} -{{- if .Values.server.serviceMonitor.relabelings }} - relabelings: -{{ tpl (toYaml .Values.server.serviceMonitor.relabelings | indent 4) . }} -{{- end }} -{{- end }} diff --git a/charts/konnectivity-agent/templates/rbac.yaml b/charts/konnectivity-agent/templates/server/clusterrolebinding.yaml similarity index 75% rename from charts/konnectivity-agent/templates/rbac.yaml rename to charts/konnectivity-agent/templates/server/clusterrolebinding.yaml index 1afa86c..4837947 100644 --- a/charts/konnectivity-agent/templates/rbac.yaml +++ b/charts/konnectivity-agent/templates/server/clusterrolebinding.yaml @@ -2,9 +2,9 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: name: system:konnectivity-server - namespace: {{ .Release.Namespace }} labels: -{{ include "konnectivity-agent.labels" . | indent 4 }} + {{- include "konnectivity-server.labels" . | nindent 4 }} + kubernetes.io/cluster-service: "true" roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole diff --git a/charts/konnectivity-agent/templates/server-service.yaml b/charts/konnectivity-agent/templates/server/service.yaml similarity index 100% rename from charts/konnectivity-agent/templates/server-service.yaml rename to charts/konnectivity-agent/templates/server/service.yaml diff --git a/charts/konnectivity-agent/templates/serviceMonitor.yaml b/charts/konnectivity-agent/templates/servicemonitor.yaml similarity index 100% rename from charts/konnectivity-agent/templates/serviceMonitor.yaml rename to charts/konnectivity-agent/templates/servicemonitor.yaml diff --git a/charts/konnectivity-agent/values.yaml b/charts/konnectivity-agent/values.yaml index a3ed012..7fc0797 100644 --- a/charts/konnectivity-agent/values.yaml +++ b/charts/konnectivity-agent/values.yaml @@ -8,7 +8,7 @@ image: repository: registry.k8s.io/kas-network-proxy/proxy-agent pullPolicy: Always -nameOverride: "" +nameOverride: '' cluster: host: @@ -26,14 +26,16 @@ pdb: serviceAccount: # The name of the service account to use. # If not set and create is true, a name is generated using the fullname template - name: "konnectivity-agent" + name: 'konnectivity-agent' podAnnotations: {} -podSecurityContext: {} +podSecurityContext: + {} # fsGroup: 2000 -securityContext: {} +securityContext: + {} # capabilities: # drop: # - ALL @@ -41,7 +43,8 @@ securityContext: {} # runAsNonRoot: true # runAsUser: 1000 -resources: {} +resources: + {} # We usually recommend not to specify default resources and to leave this as a conscious # choice for the user. This also increases chances charts run on environments with little # resources, such as Minikube. If you do want to specify resources, uncomment the following @@ -58,8 +61,8 @@ nodeSelector: {} affinity: {} tolerations: -- key: "CriticalAddonsOnly" - operator: "Exists" + - key: 'CriticalAddonsOnly' + operator: 'Exists' topologySpreadConstraints: {} @@ -69,11 +72,11 @@ serviceMonitor: extraLabels: {} ## Scrape interval. If not set, the Prometheus default scrape interval is used. ## - interval: "" + interval: '' ## proxyUrl: URL of a proxy that should be used for scraping. ## - proxyUrl: "" + proxyUrl: '' ## MetricRelabelConfigs to apply to samples after scraping, but before ingestion. ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#relabelconfig @@ -100,17 +103,19 @@ serviceMonitor: # foo: bar server: + serviceAccount: + name: 'konnectivity-server' serviceMonitor: enabled: false ## Set extraLabels for the serviceMonitor object. extraLabels: {} ## Scrape interval. If not set, the Prometheus default scrape interval is used. ## - interval: "" + interval: '' ## proxyUrl: URL of a proxy that should be used for scraping. ## - proxyUrl: "" + proxyUrl: '' ## MetricRelabelConfigs to apply to samples after scraping, but before ingestion. ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#relabelconfig @@ -139,18 +144,16 @@ server: proportional-autoscaler: enabled: false image: - tag: v1.8.9 + tag: v1.9.0 fullnameOverride: konnectivity-agent-proportional-autoscaler options: target: deployment/konnectivity-agent - replicaCount: 2 - - # config: - # linear: - # coresPerReplica: 32 - # nodesPerReplica: 4 - # min: 2 - # max: 50 - # preventSinglePointFailure: true - # includeUnschedulableNodes: true + config: + linear: + coresPerReplica: 32 + nodesPerReplica: 4 + min: 2 + max: 50 + preventSinglePointFailure: true + includeUnschedulableNodes: true