Skip to content

Commit

Permalink
Merge pull request #145 from 3scale/zync-routing
Browse files Browse the repository at this point in the history
Zync routing
  • Loading branch information
miguelsorianod authored Jun 14, 2019
2 parents 3168d8e + 66eac16 commit d7c4fa3
Show file tree
Hide file tree
Showing 17 changed files with 2,274 additions and 1,570 deletions.
8 changes: 8 additions & 0 deletions deploy/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ rules:
- ""
resources:
- pods
- replicationcontrollers
- services
- endpoints
- persistentvolumeclaims
Expand Down Expand Up @@ -39,6 +40,13 @@ rules:
- 3scale-operator
verbs:
- "update"
- apiGroups:
- rbac.authorization.k8s.io
resources:
- roles
- rolebindings
verbs:
- '*'
- apiGroups:
- image.openshift.io
resources:
Expand Down
276 changes: 166 additions & 110 deletions pkg/3scale/amp/auto-generated-templates/amp/amp-eval-s3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1461,72 +1461,6 @@ objects:
deploymentConfig: system-app
status:
loadBalancer: {}
- apiVersion: route.openshift.io/v1
kind: Route
metadata:
creationTimestamp: null
labels:
app: ${APP_LABEL}
threescale_component: system
threescale_component_element: provider-ui
name: system-provider-admin
spec:
host: ${TENANT_NAME}-admin.${WILDCARD_DOMAIN}
port:
targetPort: http
tls:
insecureEdgeTerminationPolicy: Allow
termination: edge
to:
kind: Service
name: system-provider
weight: null
status:
ingress: null
- apiVersion: route.openshift.io/v1
kind: Route
metadata:
creationTimestamp: null
labels:
app: ${APP_LABEL}
threescale_component: system
threescale_component_element: master-ui
name: system-master
spec:
host: ${MASTER_NAME}.${WILDCARD_DOMAIN}
port:
targetPort: http
tls:
insecureEdgeTerminationPolicy: Allow
termination: edge
to:
kind: Service
name: system-master
weight: null
status:
ingress: null
- apiVersion: route.openshift.io/v1
kind: Route
metadata:
creationTimestamp: null
labels:
app: ${APP_LABEL}
threescale_component: system
threescale_component_element: developer-ui
name: system-developer
spec:
host: ${TENANT_NAME}.${WILDCARD_DOMAIN}
port:
targetPort: http
tls:
insecureEdgeTerminationPolicy: Allow
termination: edge
to:
kind: Service
name: system-developer
weight: null
status:
ingress: null
- apiVersion: v1
kind: Service
metadata:
Expand Down Expand Up @@ -3625,9 +3559,63 @@ objects:
stringData:
SERVERS: system-memcache:11211
type: Opaque
- apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
creationTimestamp: null
name: zync-que-role
rules:
- apiGroups:
- apps.openshift.io
resources:
- deploymentconfigs
verbs:
- get
- list
- apiGroups:
- ""
resources:
- pods
- replicationcontrollers
verbs:
- get
- list
- apiGroups:
- route.openshift.io
resources:
- routes
- routes/status
- routes/custom-host
verbs:
- get
- list
- create
- delete
- apiVersion: v1
imagePullSecrets:
- name: threescale-registry-auth
kind: ServiceAccount
metadata:
creationTimestamp: null
name: zync-que-sa
- apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
creationTimestamp: null
name: zync-que-rolebinding
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: zync-que-role
subjects:
- kind: ServiceAccount
name: zync-que-sa
- apiVersion: apps.openshift.io/v1
kind: DeploymentConfig
metadata:
annotations:
prometheus.io/port: "9393"
prometheus.io/scrape: "true"
creationTimestamp: null
labels:
app: ${APP_LABEL}
Expand Down Expand Up @@ -3668,6 +3656,14 @@ objects:
secretKeyRef:
key: ZYNC_AUTHENTICATION_TOKEN
name: zync
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: POD_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
image: amp-zync:latest
livenessProbe:
failureThreshold: 10
Expand Down Expand Up @@ -3730,6 +3726,110 @@ objects:
replicas: 0
unavailableReplicas: 0
updatedReplicas: 0
- apiVersion: apps.openshift.io/v1
kind: DeploymentConfig
metadata:
creationTimestamp: null
labels:
app: ${APP_LABEL}
threescale_component: zync
name: zync-que
spec:
replicas: 1
selector:
deploymentConfig: zync-que
strategy:
resources: {}
rollingParams:
intervalSeconds: 1
maxSurge: 25%
maxUnavailable: 25%
timeoutSeconds: 600
updatePeriodSeconds: 1
type: Rolling
template:
metadata:
annotations:
prometheus.io/port: "9394"
prometheus.io/scrape: "true"
creationTimestamp: null
labels:
app: ${APP_LABEL}
deploymentConfig: zync-que
spec:
containers:
- args:
- -c
- bundle exec rake 'que[--worker-count 10]'
command:
- /usr/bin/bash
env:
- name: RAILS_LOG_TO_STDOUT
value: "true"
- name: RAILS_ENV
value: production
- name: DATABASE_URL
valueFrom:
secretKeyRef:
key: DATABASE_URL
name: zync
- name: SECRET_KEY_BASE
valueFrom:
secretKeyRef:
key: SECRET_KEY_BASE
name: zync
- name: ZYNC_AUTHENTICATION_TOKEN
valueFrom:
secretKeyRef:
key: ZYNC_AUTHENTICATION_TOKEN
name: zync
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: POD_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
image: amp-zync:latest
imagePullPolicy: Always
livenessProbe:
failureThreshold: 3
httpGet:
path: /metrics
port: 9394
scheme: HTTP
initialDelaySeconds: 10
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 60
name: que
ports:
- containerPort: 9394
name: metrics
protocol: TCP
resources: {}
restartPolicy: Always
serviceAccountName: zync-que-sa
terminationGracePeriodSeconds: 30
test: false
triggers:
- type: ConfigChange
- imageChangeParams:
automatic: true
containerNames:
- que
from:
kind: ImageStreamTag
name: amp-zync:latest
type: ImageChange
status:
availableReplicas: 0
latestVersion: 0
observedGeneration: 0
replicas: 0
unavailableReplicas: 0
updatedReplicas: 0
- apiVersion: apps.openshift.io/v1
kind: DeploymentConfig
metadata:
Expand Down Expand Up @@ -4147,50 +4247,6 @@ objects:
deploymentConfig: apicast-production
status:
loadBalancer: {}
- apiVersion: route.openshift.io/v1
kind: Route
metadata:
creationTimestamp: null
labels:
app: ${APP_LABEL}
threescale_component: apicast
threescale_component_element: staging
name: api-apicast-staging
spec:
host: api-${TENANT_NAME}-apicast-staging.${WILDCARD_DOMAIN}
port:
targetPort: gateway
tls:
insecureEdgeTerminationPolicy: Allow
termination: edge
to:
kind: Service
name: apicast-staging
weight: null
status:
ingress: null
- apiVersion: route.openshift.io/v1
kind: Route
metadata:
creationTimestamp: null
labels:
app: ${APP_LABEL}
threescale_component: apicast
threescale_component_element: production
name: api-apicast-production
spec:
host: api-${TENANT_NAME}-apicast-production.${WILDCARD_DOMAIN}
port:
targetPort: gateway
tls:
insecureEdgeTerminationPolicy: Allow
termination: edge
to:
kind: Service
name: apicast-production
weight: null
status:
ingress: null
- apiVersion: v1
data:
APICAST_MANAGEMENT_API: ${APICAST_MANAGEMENT_API}
Expand Down
Loading

0 comments on commit d7c4fa3

Please sign in to comment.