Skip to content

Instantly share code, notes, and snippets.

@ikurni
Created November 3, 2023 03:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ikurni/4c9ae3b97a1b26c13115fe620ef4b57d to your computer and use it in GitHub Desktop.
Save ikurni/4c9ae3b97a1b26c13115fe620ef4b57d to your computer and use it in GitHub Desktop.
Red Hat 3scale DNS lookup Slowdown
###The workaround consist on modifying the settings to accept the internal hostname. The steps are the following:
###Copy the settings.yml file from system-app:
oc rsh -c system-provider dc/system-app cat /opt/system/config/settings.yml > settings.yml
###Edit the field apicast_internal_host_regexp from
# '\Asystem-(master|provider|developer)\Z'
# to
# '\Asystem-(master|developer|provider)(\.(.*)(\.svc\.cluster\.local))?\Z'
###Create a configmap:
oc create configmap settings-svc --from-file=settings.yml
###Create a volume to mount the configmap:
oc set volume dc/system-app --add --name=settings-svc --mount-path /opt/system/config/settings.yml --sub-path settings.yml --source='{"configMap":{"name":"settings-svc","items":[{"key":"settings.yml","path":"settings.yml"}]}}'
###Update the value of the PROXY_CONFIGS_ENDPOINT in the secret system-master-apicast from
# http://<token>@system-master:3000/master/api/proxy/configs
# to
# http://<token>@system-master.<namespace>.svc.cluster.local:3000/master/api/proxy/configs
###Redeploy apicast-staging and apicast-production.
oc rollout latest dc/apicast-production
oc rollout latest dc/apicast-staging
###Modify backend-listener secret service_endpoint :
#from :
#http://backend-listener:3000
#to:
#http://backend-listener.threescale.svc.cluster.local:3000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment