diff --git a/k8s/operator.go b/k8s/operator.go index 9bb8f4e..a8d6b0a 100644 --- a/k8s/operator.go +++ b/k8s/operator.go @@ -8,11 +8,12 @@ import ( ) const ( - tykModePro = "pro" - tykModeKey = "TYK_MODE" - tykAuthKey = "TYK_AUTH" - tykOrgKey = "TYK_ORG" - tykURLKey = "TYK_URL" + tykModePro = "pro" + tykModeKey = "TYK_MODE" + tykAuthKey = "TYK_AUTH" + tykOrgKey = "TYK_ORG" + tykURLKey = "TYK_URL" + tykOperatorLicenseKey = "TYK_OPERATOR_LICENSEKEY" ) // BootstrapTykOperatorSecret bootstrap a Kubernetes Secret utilized by Tyk Operator. @@ -24,10 +25,11 @@ func (c *Client) BootstrapTykOperatorSecret() error { } secretData := map[string][]byte{ - tykAuthKey: []byte(c.appArgs.Tyk.Admin.Auth), - tykOrgKey: []byte(c.appArgs.Tyk.Org.ID), - tykModeKey: []byte(tykModePro), - tykURLKey: []byte(c.appArgs.K8s.DashboardSvcUrl), + tykAuthKey: []byte(c.appArgs.Tyk.Admin.Auth), + tykOrgKey: []byte(c.appArgs.Tyk.Org.ID), + tykModeKey: []byte(tykModePro), + tykURLKey: []byte(c.appArgs.K8s.DashboardSvcUrl), + tykOperatorLicenseKey: []byte(c.appArgs.OperatorLicenseKey), } objectMeta := metav1.ObjectMeta{Name: c.appArgs.OperatorKubernetesSecretName} diff --git a/pkg/config/config.go b/pkg/config/config.go index 99e649b..cdd549d 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -24,6 +24,8 @@ type Config struct { // OperatorKubernetesSecretName corresponds to the Kubernetes secret name that will be created for Tyk Operator. // Set it to an empty string to disable bootstrapping Kubernetes secret for Tyk Operator. OperatorKubernetesSecretName string + // OperatorLicenseKey corresponds to Operator license key + OperatorLicenseKey string // DevPortalKubernetesSecretName corresponds to the Kubernetes secret name that will be created for // Tyk Developer Portal. Set it to an empty to string to disable bootstrapping Kubernetes // secret for Tyk Developer Portal.