diff --git a/index.yaml b/index.yaml index 140926e..73eeb13 100644 --- a/index.yaml +++ b/index.yaml @@ -1,6 +1,17 @@ apiVersion: v1 entries: connector: + - apiVersion: v1 + appVersion: latest + created: "2024-07-23T16:13:05.854478418Z" + description: Twingate Connector helm chart + digest: f5998a69c99879413d99e9d5a9470cad6907a897fffbfe9d58d40dd1c7d7dbb3 + home: https://www.twingate.com + icon: https://www.twingate.com/twingate.png + name: connector + urls: + - https://twingate.github.io/helm-charts/packages/connector-0.1.26.tgz + version: 0.1.26 - apiVersion: v1 appVersion: latest created: "2024-06-11T15:53:12.408518685Z" @@ -178,4 +189,4 @@ entries: urls: - https://twingate.github.io/helm-charts/packages/connector-0.1.9.tgz version: 0.1.9 -generated: "2024-06-11T15:53:12.407865292Z" +generated: "2024-07-23T16:13:05.853589721Z" diff --git a/packages/connector-0.1.26.tgz b/packages/connector-0.1.26.tgz new file mode 100644 index 0000000..724935c Binary files /dev/null and b/packages/connector-0.1.26.tgz differ diff --git a/stable/connector/Chart.yaml b/stable/connector/Chart.yaml index 2cd0590..b320476 100644 --- a/stable/connector/Chart.yaml +++ b/stable/connector/Chart.yaml @@ -4,4 +4,4 @@ home: https://www.twingate.com description: Twingate Connector helm chart icon: https://www.twingate.com/twingate.png name: connector -version: 0.1.25 +version: 0.1.26 diff --git a/stable/connector/README.md b/stable/connector/README.md index 03e2ad9..4993b3c 100644 --- a/stable/connector/README.md +++ b/stable/connector/README.md @@ -80,6 +80,7 @@ The following table lists the configurable parameters of the Twingate chart and | `priorityClassName` | String to added priorityClass for pod assignment | `nil` | | `nodeSelector` | node labels for pod assignment | `{}` (The value is evaluated as a template) | | `tolerations` | Tolerations for pod assignment | `[]` (The value is evaluated as a template) | +| `topologySpreadConstraints` | Topology spread constraints for pod assignment | `[]` (The value is evaluated as a template) | | `resources` | Resource requests and limits | `{}` (The value is evaluated as a template) | | `additionalLabels` | Additional labels for the deployment | `{}` (The value is evaluated as a template) | | `podAnnotations` | Map of annotations to add to pods | `{}` | diff --git a/stable/connector/templates/deployment.yaml b/stable/connector/templates/deployment.yaml index 67a9194..932e733 100644 --- a/stable/connector/templates/deployment.yaml +++ b/stable/connector/templates/deployment.yaml @@ -96,6 +96,10 @@ spec: tolerations: {{- toYaml . | nindent 8 }} {{- end }} + {{- with .Values.topologySpreadConstraints }} + topologySpreadConstraints: + {{- toYaml . | nindent 8 }} + {{- end }} {{- if .Values.priorityClassName }} priorityClassName: {{ .Values.priorityClassName | quote }} {{- end }} diff --git a/stable/connector/values.yaml b/stable/connector/values.yaml index 40afcd7..fb038c5 100644 --- a/stable/connector/values.yaml +++ b/stable/connector/values.yaml @@ -41,6 +41,11 @@ nodeSelector: {} ## tolerations: [] +## topologySpreadConstraints Topology spread constraints for pod +## Ref: https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/ +## +topologySpreadConstraints: [] + ## affinity for pod assignment ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity ## Note: podAffinityPreset, podAntiAffinityPreset, and nodeAffinityPreset will be ignored when it's set diff --git a/test/golden/topology.golden.yaml b/test/golden/topology.golden.yaml new file mode 100644 index 0000000..72338f9 --- /dev/null +++ b/test/golden/topology.golden.yaml @@ -0,0 +1,73 @@ +--- +# Source: connector/templates/secret.yaml +apiVersion: v1 +kind: Secret +metadata: + name: test-connector + labels: + app.kubernetes.io/name: connector + helm.sh/chart: connector-major.minor.patch-test + app.kubernetes.io/instance: test + app.kubernetes.io/version: "latest" + app.kubernetes.io/managed-by: Helm +type: Opaque +data: + TWINGATE_ACCESS_TOKEN: "QUNDRVNTX1RPS0VO" + TWINGATE_REFRESH_TOKEN: "UkVGUkVTSF9UT0tFTg==" +--- +# Source: connector/templates/deployment.yaml +apiVersion: apps/v1 +kind: Deployment +metadata: + name: test-connector + labels: + app.kubernetes.io/name: connector + helm.sh/chart: connector-major.minor.patch-test + app.kubernetes.io/instance: test + app.kubernetes.io/version: "latest" + app.kubernetes.io/managed-by: Helm +spec: + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/name: connector + app.kubernetes.io/instance: test + template: + metadata: + labels: + app.kubernetes.io/name: connector + app.kubernetes.io/instance: test + spec: + containers: + - name: connector + image: "twingate/connector:1" + imagePullPolicy: Always + envFrom: + - secretRef: + name: test-connector + optional: false + env: + - name: TWINGATE_LABEL_DEPLOYED_BY + value: helm + - name: TWINGATE_LABEL_HELM_CHART + value: connector-major.minor.patch-test + - name: TWINGATE_URL + value: "https://test-tenant.twingate.com" + - name: TWINGATE_LOG_LEVEL + value: "3" + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: ["ALL"] + runAsNonRoot: true + runAsUser: 65532 + resources: + requests: + cpu: 50m + memory: 200Mi + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/name: connector + maxSkew: 1 + topologyKey: kubernetes.io/hostname diff --git a/test/golden/topology.yaml b/test/golden/topology.yaml new file mode 100644 index 0000000..1599605 --- /dev/null +++ b/test/golden/topology.yaml @@ -0,0 +1,11 @@ +topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/name: connector + maxSkew: 1 + topologyKey: kubernetes.io/hostname + +connector: + network: "test-tenant" + accessToken: "ACCESS_TOKEN" + refreshToken: "REFRESH_TOKEN"