Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate dbs to imagestreams #122

Merged
merged 6 commits into from
May 23, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
212 changes: 204 additions & 8 deletions pkg/3scale/amp/auto-generated-templates/amp/amp-eval-s3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -200,24 +200,184 @@ objects:
- apiVersion: image.openshift.io/v1
kind: ImageStream
metadata:
annotations:
openshift.io/display-name: Zync database
creationTimestamp: null
labels:
app: ${APP_LABEL}
threescale_component: system
threescale_component_element: postgresql
name: postgresql
spec:
lookupPolicy:
local: false
tags:
- annotations: null
- annotations:
openshift.io/display-name: Zync PostgreSQL (latest)
from:
kind: ImageStreamTag
name: ${AMP_RELEASE}
generation: null
importPolicy: {}
name: latest
referencePolicy:
type: ""
- annotations:
openshift.io/display-name: Zync ${AMP_RELEASE} PostgreSQL
from:
kind: DockerImage
name: ${POSTGRESQL_IMAGE}
generation: null
importPolicy:
insecure: ${{IMAGESTREAM_TAG_IMPORT_INSECURE}}
name: "10"
name: ${AMP_RELEASE}
referencePolicy:
type: ""
status:
eguzki marked this conversation as resolved.
Show resolved Hide resolved
dockerImageRepository: ""
- apiVersion: image.openshift.io/v1
kind: ImageStream
metadata:
annotations:
openshift.io/display-name: Backend Redis
creationTimestamp: null
labels:
app: ${APP_LABEL}
threescale_component: backend
name: backend-redis
spec:
lookupPolicy:
local: false
tags:
- annotations:
openshift.io/display-name: Backend Redis (latest)
from:
kind: ImageStreamTag
name: ${AMP_RELEASE}
generation: null
importPolicy: {}
name: latest
referencePolicy:
type: ""
- annotations:
openshift.io/display-name: Backend ${AMP_RELEASE} Redis
from:
kind: DockerImage
name: ${REDIS_IMAGE}
generation: null
importPolicy:
insecure: ${{IMAGESTREAM_TAG_IMPORT_INSECURE}}
name: ${AMP_RELEASE}
referencePolicy:
type: ""
status:
dockerImageRepository: ""
- apiVersion: image.openshift.io/v1
kind: ImageStream
metadata:
annotations:
openshift.io/display-name: System Redis
creationTimestamp: null
labels:
app: ${APP_LABEL}
threescale_component: system
name: system-redis
spec:
lookupPolicy:
local: false
tags:
- annotations:
openshift.io/display-name: System Redis (latest)
from:
kind: ImageStreamTag
name: ${AMP_RELEASE}
generation: null
importPolicy: {}
name: latest
referencePolicy:
type: ""
- annotations:
openshift.io/display-name: System ${AMP_RELEASE} Redis
from:
kind: DockerImage
name: ${REDIS_IMAGE}
generation: null
importPolicy:
insecure: ${{IMAGESTREAM_TAG_IMPORT_INSECURE}}
name: ${AMP_RELEASE}
referencePolicy:
type: ""
status:
dockerImageRepository: ""
- apiVersion: image.openshift.io/v1
kind: ImageStream
metadata:
annotations:
openshift.io/display-name: System Memcached
creationTimestamp: null
labels:
app: ${APP_LABEL}
threescale_component: system
name: system-memcached
spec:
lookupPolicy:
local: false
tags:
- annotations:
openshift.io/display-name: System Memcached (latest)
from:
kind: ImageStreamTag
name: ${AMP_RELEASE}
generation: null
importPolicy: {}
name: latest
referencePolicy:
type: ""
- annotations:
openshift.io/display-name: System ${AMP_RELEASE} Memcached
from:
kind: DockerImage
name: ${MEMCACHED_IMAGE}
generation: null
importPolicy:
insecure: ${{IMAGESTREAM_TAG_IMPORT_INSECURE}}
name: ${AMP_RELEASE}
referencePolicy:
type: ""
status:
dockerImageRepository: ""
- apiVersion: image.openshift.io/v1
kind: ImageStream
metadata:
annotations:
openshift.io/display-name: System MySQL
creationTimestamp: null
labels:
app: ${APP_LABEL}
threescale_component: system
name: system-mysql
spec:
lookupPolicy:
local: false
tags:
- annotations:
openshift.io/display-name: System MySQL (latest)
from:
kind: ImageStreamTag
name: ${AMP_RELEASE}
generation: null
importPolicy: {}
name: latest
referencePolicy:
type: ""
- annotations:
openshift.io/display-name: System ${AMP_RELEASE} MySQL
from:
kind: DockerImage
name: ${MYSQL_IMAGE}
generation: null
importPolicy:
insecure: ${{IMAGESTREAM_TAG_IMPORT_INSECURE}}
name: ${AMP_RELEASE}
referencePolicy:
type: ""
status:
Expand Down Expand Up @@ -261,7 +421,7 @@ objects:
- "no"
command:
- /opt/rh/rh-redis32/root/usr/bin/redis-server
image: ${REDIS_IMAGE}
image: backend-redis:latest
imagePullPolicy: IfNotPresent
livenessProbe:
initialDelaySeconds: 10
Expand Down Expand Up @@ -299,6 +459,14 @@ objects:
test: false
triggers:
- type: ConfigChange
- imageChangeParams:
automatic: true
containerNames:
- backend-redis
from:
kind: ImageStreamTag
name: backend-redis:latest
type: ImageChange
status:
availableReplicas: 0
latestVersion: 0
Expand Down Expand Up @@ -429,7 +597,7 @@ objects:
- "no"
command:
- /opt/rh/rh-redis32/root/usr/bin/redis-server
image: ${REDIS_IMAGE}
image: system-redis:latest
imagePullPolicy: IfNotPresent
livenessProbe:
initialDelaySeconds: 10
Expand All @@ -454,6 +622,7 @@ objects:
name: system-redis-storage
- mountPath: /etc/redis.d/
name: redis-config
serviceAccountName: amp
volumes:
- name: system-redis-storage
persistentVolumeClaim:
Expand All @@ -467,6 +636,14 @@ objects:
test: false
triggers:
- type: ConfigChange
- imageChangeParams:
automatic: true
containerNames:
- system-redis
from:
kind: ImageStreamTag
name: system-redis:latest
type: ImageChange
status:
availableReplicas: 0
latestVersion: 0
Expand Down Expand Up @@ -987,7 +1164,7 @@ objects:
value: "1"
- name: MYSQL_DEFAULTS_FILE
value: /etc/my-extra/my.cnf
image: ${MYSQL_IMAGE}
image: system-mysql:latest
imagePullPolicy: IfNotPresent
livenessProbe:
initialDelaySeconds: 30
Expand Down Expand Up @@ -1017,6 +1194,7 @@ objects:
name: mysql-extra-conf
- mountPath: /etc/my-extra
name: mysql-main-conf
serviceAccountName: amp
volumes:
- name: mysql-storage
persistentVolumeClaim:
Expand All @@ -1030,6 +1208,14 @@ objects:
test: false
triggers:
- type: ConfigChange
- imageChangeParams:
automatic: true
containerNames:
- system-mysql
from:
kind: ImageStreamTag
name: system-mysql:latest
type: ImageChange
status:
availableReplicas: 0
latestVersion: 0
Expand Down Expand Up @@ -1155,7 +1341,7 @@ objects:
- memcached
- -m
- "64"
image: ${MEMCACHED_IMAGE}
image: system-memcached:latest
imagePullPolicy: IfNotPresent
livenessProbe:
initialDelaySeconds: 10
Expand All @@ -1176,9 +1362,18 @@ objects:
periodSeconds: 30
timeoutSeconds: 5
resources: {}
serviceAccountName: amp
test: false
triggers:
- type: ConfigChange
- imageChangeParams:
automatic: true
containerNames:
- memcache
from:
kind: ImageStreamTag
name: system-memcached:latest
type: ImageChange
status:
availableReplicas: 0
latestVersion: 0
Expand Down Expand Up @@ -3266,6 +3461,7 @@ objects:
- mountPath: /var/lib/pgsql/data
name: zync-database-data
restartPolicy: Always
serviceAccountName: amp
volumes:
- emptyDir: {}
name: zync-database-data
Expand All @@ -3278,7 +3474,7 @@ objects:
- postgresql
from:
kind: ImageStreamTag
name: postgresql:10
name: postgresql:latest
type: ImageChange
status:
availableReplicas: 0
Expand Down
Loading