allow_explicit_policy_id
and
enable_duplicate_slugs
set to true
and Gateway must have policies.allow_explicit_policy_id
set to true
.
Tyk Operator needs a user credential to connect with
Tyk Dashboard. The Operator user should have write access to the resources it is going to manage, e.g. APIs, Certificates,
Policies, and Portal. It is the recommended practice to turn off write access for other users for the above resources. See
Using Tyk Operator to enable GitOps with Tyk about
maintaining a single source of truth for your API configurations.
cert-manager
requirement. For more details, please refer to this configuration.
global.components.operator
to true
.
Starting from Tyk Operator v1.0, a license key is required to use the Tyk Operator. You can provide it while installing
Tyk Stack, Tyk Control Plane or Tyk OSS helm chart by setting global.license.operator
field. You can also set license
key via a Kubernetes secret using global.secrets.useSecretName
field. The secret should contain a key called
OperatorLicense
Note: If you are using global.secrets.useSecretName
, you must configure the operator license in the referenced Kubernetes secret. global.license.operator
will not be used in this case.
envVars
field of helm chart. See the table below for a list of expected
environment variable names and example values.
tyk-operator-conf
. If you want to use
another name, configure it through Helm Chart envFrom value.
The Kubernetes secret or envVars field should set the following keys:
Key | Mandatory | Example Value | Description |
---|---|---|---|
TYK_OPERATOR_LICENSEKEY | Yes | <JWT_ENCODED_LICENSE_KEY> | Tyk Operator license key |
TYK_MODE | Yes | pro | “ce” for Tyk Open Source mode, “pro” for Tyk licensed mode. |
TYK_URL | Yes | http://dashboard-svc-tyk-tyk-dashboard.tyk.svc:3000 | Management URL of Tyk Gateway (Open Source) or Tyk Dashboard |
TYK_AUTH | Yes | 2d095c2155774fe36d77e5cbe3ac963b | Operator user API key. |
TYK_ORG | Yes | 5e9d9544a1dcd60001d0ed20 | Operator user ORG ID. |
TYK_TLS_INSECURE_SKIP_VERIFY | No | true | Set to “true” if the Tyk URL is HTTPS and has a self-signed certificate. If it isn’t set, the default value is false . |
WATCH_NAMESPACE | No | foo,bar | Comma separated list of namespaces for Operator to operate on. The default is to operate on all namespaces if not specified. |
WATCH_INGRESS_CLASS | No | customclass | Define the ingress class Tyk Operator should watch. Default is tyk |
TYK_HTTPS_INGRESS_PORT | No | 8443 | Define the ListenPort for HTTPS ingress. Default is 8443 . |
TYK_HTTP_INGRESS_PORT | No | 8080 | Define the ListenPort for HTTP ingress. Default is 8080 . |
tyk-operator-conf
will have been created with the following keys:
TYK_OPERATOR_LICENSEKEY, TYK_AUTH, TYK_MODE, TYK_ORG
, and TYK_URL
by default. If you didn’t use Helm Chart for
installation, please prepare tyk-operator-conf
secret yourself using the commands below:
TYK_AUTH
corresponds
to Tyk Dashboard API Access Credentials. TYK_ORG
corresponds to Organization ID.tyk-operator-conf
are ever changed or updated, the tyk-operator-controller-manager
pod must be restarted to pick up these changes.WATCH_NAMESPACE
through tyk-operator-conf
secret or the environment variable to a comma separated list
of k8s namespaces. For example:
WATCH_NAMESPACE=""
will watch for resources across the entire cluster.WATCH_NAMESPACE="foo"
will watch for resources in the foo
namespace.WATCH_NAMESPACE="foo,bar"
will watch for resources in the foo
and bar
namespace.tyk
in Ingress resources kubernetes.io/ingress.class
annotation
and will ignore all other ingress classes. If you want to override this default behavior, you may do so by setting
WATCH_INGRESS_CLASS through tyk-operator-conf
or the environment variable.
tyk-operator-system
namespace.
Helm configurations
webhookPort
is deprecated in favor of webhooks.port
.Key | Type | Default |
---|---|---|
envFrom[0].secretRef.name | string | "tyk-operator-conf" |
envVars[0].name | string | "TYK_OPERATOR_LICENSEKEY" |
envVars[0].value | string | "{OPERATOR_LICENSEKEY}" |
envVars[1].name | string | "TYK_HTTPS_INGRESS_PORT" |
envVars[1].value | string | "8443" |
envVars[2].name | string | "TYK_HTTP_INGRESS_PORT" |
envVars[2].value | string | "8080" |
extraVolumeMounts | list | [] |
extraVolumes | list | [] |
fullnameOverride | string | "" |
healthProbePort | int | 8081 |
hostNetwork | bool | false |
image.pullPolicy | string | "IfNotPresent" |
image.repository | string | "tykio/tyk-operator" |
image.tag | string | "v1.0.0" |
imagePullSecrets | list | [] |
metricsPort | int | 8080 |
nameOverride | string | "" |
nodeSelector | object | {} |
podAnnotations | object | {} |
podSecurityContext.allowPrivilegeEscalation | bool | false |
rbac.port | int | 8443 |
rbac.resources | object | {} |
replicaCount | int | 1 |
resources | object | {} |
serviceMonitor | bool | false |
webhookPort | int | 9443 |
webhooks.enabled | bool | true |
webhooks.port | int | 9443 |
webhooks.annotations | object | {} |
webhooks.tls.useCertManager | bool | true |
webhooks.tls.secretName | string | webhook-server-cert |
webhooks.tls.certificatesMountPath | string | /tmp/k8s-webhook-server/serving-certs |
TYK_OPERATOR_LICENSEKEY
. Populate this field
with your Tyk Operator license key.
To configure the license key:
tyk-operator-conf
).TYK_OPERATOR_LICENSEKEY
to this Secret.TYK_OPERATOR_LICENSEKEY
to your Tyk Operator license key.enabled
: Enables or disables webhooks.port
: Specifies the port for webhook communication.annotations
: Allows adding custom annotations.tls.useCertManager
: If true, Cert-Manager will handle TLS certificates.tls.secretName
: The name of the Kubernetes Secret storing the TLS certificate.tls.certificatesMountPath
: Path where the webhook server mounts its certificates.