Skip to content

Commit

Permalink
Merge pull request #8 from ninech/fix-nameserver-args-passing
Browse files Browse the repository at this point in the history
allow to customize nameserver deployment
  • Loading branch information
thirdeyenick authored Dec 18, 2024
2 parents c6d3f62 + dc1b410 commit 2007628
Show file tree
Hide file tree
Showing 6 changed files with 312 additions and 48 deletions.
135 changes: 123 additions & 12 deletions cmd/k8s-operator/deploy/crds/tailscale.com_dnsconfigs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,6 @@ spec:
required:
- nameserver
properties:
domain:
description: |-
Domain is the domain for which DNS entries will be resolved. If left
empty, the default of the k8s-nameserver will be used.
type: string
nameserver:
description: |-
Configuration for a nameserver that can resolve ts.net DNS names
Expand All @@ -93,6 +88,122 @@ spec:
when a DNSConfig is applied.
type: object
properties:
cmd:
description: Cmd can be used to overwrite the command used when running the nameserver image.
type: array
items:
type: string
env:
description: |-
Env can be used to pass environment variables to the nameserver
container.
type: array
items:
description: EnvVar represents an environment variable present in a Container.
type: object
required:
- name
properties:
name:
description: Name of the environment variable. Must be a C_IDENTIFIER.
type: string
value:
description: |-
Variable references $(VAR_NAME) are expanded
using the previously defined environment variables in the container and
any service environment variables. If a variable cannot be resolved,
the reference in the input string will be unchanged. Double $$ are reduced
to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e.
"$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)".
Escaped references will never be expanded, regardless of whether the variable
exists or not.
Defaults to "".
type: string
valueFrom:
description: Source for the environment variable's value. Cannot be used if value is not empty.
type: object
properties:
configMapKeyRef:
description: Selects a key of a ConfigMap.
type: object
required:
- key
properties:
key:
description: The key to select.
type: string
name:
description: |-
Name of the referent.
This field is effectively required, but due to backwards compatibility is
allowed to be empty. Instances of this type with an empty value here are
almost certainly wrong.
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
type: string
default: ""
optional:
description: Specify whether the ConfigMap or its key must be defined
type: boolean
x-kubernetes-map-type: atomic
fieldRef:
description: |-
Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['<KEY>']`, `metadata.annotations['<KEY>']`,
spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.
type: object
required:
- fieldPath
properties:
apiVersion:
description: Version of the schema the FieldPath is written in terms of, defaults to "v1".
type: string
fieldPath:
description: Path of the field to select in the specified API version.
type: string
x-kubernetes-map-type: atomic
resourceFieldRef:
description: |-
Selects a resource of the container: only resources limits and requests
(limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.
type: object
required:
- resource
properties:
containerName:
description: 'Container name: required for volumes, optional for env vars'
type: string
divisor:
description: Specifies the output format of the exposed resources, defaults to "1"
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
anyOf:
- type: integer
- type: string
x-kubernetes-int-or-string: true
resource:
description: 'Required: resource to select'
type: string
x-kubernetes-map-type: atomic
secretKeyRef:
description: Selects a key of a secret in the pod's namespace
type: object
required:
- key
properties:
key:
description: The key of the secret to select from. Must be a valid secret key.
type: string
name:
description: |-
Name of the referent.
This field is effectively required, but due to backwards compatibility is
allowed to be empty. Instances of this type with an empty value here are
almost certainly wrong.
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
type: string
default: ""
optional:
description: Specify whether the Secret or its key must be defined
type: boolean
x-kubernetes-map-type: atomic
image:
description: Nameserver image. Defaults to tailscale/k8s-nameserver:unstable.
type: object
Expand All @@ -103,13 +214,13 @@ spec:
tag:
description: Tag defaults to unstable.
type: string
podLabels:
description: |-
PodLabels are the labels which will be attached to the nameserver
pod. They can be used to define network policies.
type: object
additionalProperties:
type: string
podLabels:
description: |-
PodLabels are the labels which will be attached to the nameserver
pod. They can be used to define network policies.
type: object
additionalProperties:
type: string
status:
description: |-
Status describes the status of the DNSConfig. This is set
Expand Down
Loading

0 comments on commit 2007628

Please sign in to comment.