Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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,21 @@ tests:
content:
name: TWINGATE_DEFAULT_RESOURCE_TAGS
value: '{"cluster":"test-cluster","owner":"eran"}'
- it: should use `namespaces`
set:
twingateOperator:
namespaces:
- "foo"
- "bar"
asserts:
- contains:
path: spec.template.spec.containers[0].command
content:
--namespace=foo
- contains:
path: spec.template.spec.containers[0].command
content:
--namespace=bar
- it: should use `imagePullSecrets`
set:
imagePullSecrets:
Expand Down
8 changes: 7 additions & 1 deletion deploy/twingate-operator/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,13 @@
"additionalProperties": {
"type": "string"
}
}
},
"namespaces": {
"type": "array",
"description": "Array of namespaces to monitor by the operator",
"items": { "type": "string" },
"default": []
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indentation?

},
"examples": [{
"apiKey": "sdlkwdlsknsldknsldkcnm",
Expand Down
16 changes: 16 additions & 0 deletions deploy/twingate-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,22 @@ twingateOperator: {}
# tag1: value_for_tag1
# tag2: value_for_tag2

## Restrict operator to monitor resources in specific namespaces. You should either:
## 1. Specify a list of namespaces:
## namespaces: ["foo-dev", "foo-stg"]
## 2. Use globs to match multiple namespaces:
## namespaces: ["*-dev", "*-stg"]
## 3. Use negation to include all namespaces except those excluded:
## namespaces: ["!*-test"]
## 4. Use multiple globs can be used in one pattern:
Comment thread
clement0010 marked this conversation as resolved.
Outdated
## namespaces: ["foo-*,!*-test"]

## Caveat: Globs in separate array elements are evaluated independently, and the final list of namespaces is the union of all globs' results.
## i.e., `namespaces: ["foo-*", "!*-test"]` is not the same as `namespaces: ["foo-*,!*-test"]`
Comment thread
clement0010 marked this conversation as resolved.
Outdated

## For more information on using multiple globs, see: https://kopf.readthedocs.io/en/stable/scopes
# namespaces: []

# 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
Loading