TykTechnologies / tyk-charts

Mozilla Public License 2.0
25 stars 21 forks source link

tyk-oss v2.1.0 does not set operator license correctly #351

Closed lboynton closed 1 week ago

lboynton commented 1 month ago

Raising separate bug after discussing in #349.

When installing tyk-oss v2.1.0 chart and enabling the tyk operator, the license key does not get passed to the operator correctly. The operator logs show a failed to validate license error. It looks like this is because TYK_OPERATOR_LICENSEKEY is not set in the tyk-operator-conf secret.

The workaround is to either edit the secret to add TYK_OPERATOR_LICENSEKEY, or add TYK_OPERATOR_LICENSEKEY as an extra env var in the chart values.

caroltyk commented 2 weeks ago

Hi @lboynton , could you share your helm config with us if possible? Also, currently we can only set TYK_OPERATOR_LICENSEKEY in tyk-operator-conf during installation (helm install) with bootstrapping enabled. It is not possible with helm update.

lboynton commented 2 weeks ago

Hi @caroltyk, I'm using the guide here on a fresh install.

The only change is I'm setting the license and enabling the operator in the helm install command, so it looks like this:

helm upgrade tyk-oss tyk-helm/tyk-oss -n $NAMESPACE --create-namespace \          
  --install \
  --set global.secrets.APISecret="$APISecret" \
  --set global.redis.addrs="{tyk-redis-master.$NAMESPACE.svc.cluster.local:6379}" \
  --set global.redis.passSecret.name=tyk-redis \
  --set global.redis.passSecret.keyName=redis-password \
  --set global.license.operator="xxx" \
  --set global.components.operator=true

When getting the secret I can see the license key is missing.

k -n tyk-oss get secret tyk-operator-conf -o yaml
apiVersion: v1
data:
  TYK_AUTH: xxx
  TYK_MODE: xxx
  TYK_ORG: xxx
  TYK_URL: xxx
kind: Secret