Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion deploy/twingate-operator/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,13 @@ spec:
- kopf
- run
- ./main.py
- "-A"
{{- with .Values.twingateOperator.namespaces }}
{{- range . }}
- "--namespace={{ . }}"
{{- end }}
{{- else }}
- "--all-namespaces"
{{- end }}
- "--standalone"
- "--liveness=http://0.0.0.0:8080/healthz"
- "--log-format={{ $logFormat }}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ should render:
- kopf
- run
- ./main.py
- -A
- --all-namespaces
- --standalone
- --liveness=http://0.0.0.0:8080/healthz
- --log-format=full
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,24 @@ tests:
content:
name: TWINGATE_DEFAULT_RESOURCE_TAGS
value: '{"cluster":"test-cluster","owner":"eran"}'
- it: should use `namespaces`
set:
twingateOperator:
namespaces:
- foo
- bar
asserts:
- equal:
path: spec.template.spec.containers[0].command
value:
- kopf
- run
- ./main.py
- --namespace=foo
- --namespace=bar
- --standalone
- --liveness=http://0.0.0.0:8080/healthz
- --log-format=full
- it: should use `imagePullSecrets`
set:
imagePullSecrets:
Expand Down
6 changes: 6 additions & 0 deletions deploy/twingate-operator/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,12 @@
"additionalProperties": {
"type": "string"
}
},
"namespaces": {
"type": "array",
"description": "Array of namespaces to monitor by the operator",
"items": { "type": "string" },
"default": []
}
},
"examples": [{
Expand Down
21 changes: 20 additions & 1 deletion deploy/twingate-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,26 @@
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.

# Required: you have to specify `network` and
# Twingate operator configurations
#
# **Required**: you have to specify `network` and
# - either `apiKey` or `existingAPIKeySecret`
# - either `remoteNetworkId`, `remoteNetworkName` or `existingRemoteNetworkIdSecret`
#
# **Restricting Operator to Specific Namespaces**
# Use the `namespaces` property to restrict operator to monitor resources only in specific namespaces.
# You can either:
# 1. Specify a list of namespaces: ["foo-dev", "foo-stg"]
# 2. Use globs to match multiple namespaces: ["*-dev", "*-stg"]
# 3. Use negation to include all namespaces except those excluded: ["!kube-*"]
# 4. Use multiple globs in one pattern: ["foo-*,!*-test"]
#
# Default value is an empty list (`[]`) which means operator will monitor or all namespaces.
#
# *Note:* Defining glob patterns as a separate array elements is different from defining
# comma-separated patterns within a single element.
# For example, `namespaces: ["foo-*", "!*-test"]` is not the same as `namespaces: ["foo-*,!*-test"]`
# `namespaces: ["foo-*", "!*-test"]` will evaluate each glob pattern independently and combine the results.
twingateOperator: {}
# apiKey: "<api key>"
# existingAPIKeySecret:
Expand All @@ -16,12 +33,14 @@ twingateOperator: {}
# name: my-secret
# key: TWINGATE_REMOTE_NETWORK_ID
# remoteNetworkName: "<remote network name>"
# namespaces: []
# logFormat: "plain|full|json"
# logVerbosity: "quiet|verbose|debug"
# defaultResourceTags:
# tag1: value_for_tag1
# tag2: value_for_tag2


# Twingate Kubernetes Access is currently in beta. Sign up for early access at https://www.twingate.com/product/kubernetes-access.
kubernetes-access-gateway:
enabled: false
Expand Down