Skip to content

Instantly share code, notes, and snippets.

@luszczynski
Last active June 15, 2022 12:43
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 luszczynski/b19ac5b1871acf9d4f4281271237e0ab to your computer and use it in GitHub Desktop.
Save luszczynski/b19ac5b1871acf9d4f4281271237e0ab to your computer and use it in GitHub Desktop.
3Scale Custom Resource
apiVersion: apps.3scale.net/v1alpha1
kind: APIManager
metadata:
  name: 3scale-instance
  namespace: 3scale-operator
spec:
  wildcardDomain: apps.mycluster.com.br
  resourceRequirementsEnabled: true
  backend:
    redisPersistentVolumeClaim:
      storageClassName: "thin"
  system:
    redisPersistentVolumeClaim: 
      storageClassName: "thin"
    fileStorage:
      persistentVolumeClaim:
        storageClassName: "nfs01"
    database:
      mysql: 
        persistentVolumeClaim: 
          storageClassName: "thin"
  highAvailability:
    enabled: false
apiVersion: apps.3scale.net/v1alpha1
kind: APIManager
metadata:
 name: 3scale-instance
 namespace: 3scale
spec:
 wildcardDomain: apps.cluster-fpkmz.fpkmz.sandbox330.opentlc.com
 resourceRequirementsEnabled: false
 backend:
   redisPersistentVolumeClaim:
     storageClassName: "gp2"
   listenerSpec:
     replicas: 1
   workerSpec:
     replicas: 1
   cronSpec:
     replicas: 1      
 system:
   redisPersistentVolumeClaim: 
     storageClassName: "gp2"
   database:
     mysql: 
       persistentVolumeClaim: 
         storageClassName: "gp2"
   appSpec:
     replicas: 1
   sidekiqSpec:
     replicas: 1
 apicast:
  stagingSpec:
    replicas: 1
  productionSpec:
    replicas: 1
 zync:
  appSpec:
    replicas: 1
  queSpec:
    replicas: 1          
 highAvailability:
   enabled: false
apiVersion: apps.3scale.net/v1alpha1
kind: APIManager
metadata:
 name: instance-3scale
spec:
 wildcardDomain: apps.mycluster.com.br
 resourceRequirementsEnabled: true
 apicast:
   stagingSpec:
     replicas: 1
   productionSpec:
     replicas: 1
 backend:
   listenerSpec:
     replicas: 1
   workerSpec:
     replicas: 1
   cronSpec:
     replicas: 1
 system:
   appSpec:
     replicas: 1
   sidekiqSpec:
     replicas: 1
 zync:
   appSpec:
     replicas: 1
   queSpec:
     replicas: 1

APICast

oc create secret generic apicast-secret --from-literal=AdminPortalURL=https://access-token@3scale-admin.apps.cluster-956b.956b.sandbox502.opentlc.com
apiVersion: apps.3scale.net/v1alpha1
kind: APIcast
metadata:
  name: example-apicast
spec:
  adminPortalCredentialsRef:
    name: apicast-secret
  replicas: 1
  resources:
    requests:
      memory: "150Mi"
      cpu: "300m"
    limits:
      memory: "500Mi"
      cpu: "2000m"
  deploymentEnvironment: staging
  configurationLoadMode: lazy
  logLevel: warn
  responseCodesIncluded: true
  exposedHost:
    host: my-apicast-phpapp.apps.cluster-956b.956b.sandbox502.opentlc.com
    tls:
    - {}
podman pull registry.redhat.io/3scale-amp2/apicast-gateway-rhel8:3scale2.10

podman run --name apicast --rm -p 8080:8080 -e THREESCALE_PORTAL_ENDPOINT=https://<access_token>@3scale-admin.apps.cluster-956b.956b.sandbox502.opentlc.com registry.redhat.io/3scale-amp2/apicast-gateway-rhel8:3scale2.10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment