Skip to content
This repository has been archived by the owner on Jul 24, 2019. It is now read-only.

Commit

Permalink
WIP: Consistent Development Mode for Services
Browse files Browse the repository at this point in the history
To remain consistent with OSH's goals for developers, this turns
off replicas when a development flag is enabled. This will also
include the ability for developers to use a local storage option
through hostPaths or emptyDirs instead of PVCs as needed.
  • Loading branch information
wilkers-steve committed Mar 10, 2017
1 parent bc7caae commit e16ea80
Show file tree
Hide file tree
Showing 19 changed files with 78 additions and 7 deletions.
4 changes: 4 additions & 0 deletions cinder/templates/deployment-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@ kind: Deployment
metadata:
name: cinder-api
spec:
{{- if .Values.development.enabled }}
replicas: 1
{{- else }}
replicas: {{ .Values.replicas.api }}
{{- end }}
revisionHistoryLimit: {{ .Values.upgrades.revision_history }}
strategy:
type: {{ .Values.upgrades.pod_replacement_strategy }}
Expand Down
4 changes: 4 additions & 0 deletions cinder/templates/deployment-scheduler.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@ kind: Deployment
metadata:
name: cinder-scheduler
spec:
{{- if .Values.development.enabled }}
replicas: 1
{{- else }}
replicas: {{ .Values.replicas.scheduler }}
{{- end }}
revisionHistoryLimit: {{ .Values.upgrades.revision_history }}
strategy:
type: {{ .Values.upgrades.pod_replacement_strategy }}
Expand Down
4 changes: 4 additions & 0 deletions cinder/templates/deployment-volume.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@ kind: Deployment
metadata:
name: cinder-volume
spec:
{{- if .Values.development.enabled }}
replicas: 1
{{- else }}
replicas: {{ .Values.replicas.volume }}
{{- end }}
revisionHistoryLimit: {{ .Values.upgrades.revision_history }}
strategy:
type: {{ .Values.upgrades.pod_replacement_strategy }}
Expand Down
3 changes: 3 additions & 0 deletions cinder/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
# Declare name/value pairs to be passed into your templates.
# name: value

development:
enabled: false

replicas:
api: 1
volume: 1
Expand Down
4 changes: 4 additions & 0 deletions heat/templates/deployment-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@ kind: Deployment
metadata:
name: heat-api
spec:
{{- if .Values.development.enabled }}
replicas: 1
{{- else }}
replicas: {{ .Values.replicas.api }}
{{- end }}
template:
metadata:
labels:
Expand Down
4 changes: 4 additions & 0 deletions heat/templates/deployment-cfn.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@ kind: Deployment
metadata:
name: heat-cfn
spec:
{{- if .Values.development.enabled }}
replicas: 1
{{- else }}
replicas: {{ .Values.replicas.cfn }}
{{- end }}
template:
metadata:
labels:
Expand Down
4 changes: 4 additions & 0 deletions heat/templates/deployment-cloudwatch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@ kind: Deployment
metadata:
name: heat-cloudwatch
spec:
{{- if .Values.development.enabled }}
replicas: 1
{{- else }}
replicas: {{ .Values.replicas.cloudwatch }}
{{- end }}
template:
metadata:
labels:
Expand Down
4 changes: 4 additions & 0 deletions heat/templates/statefulset-engine.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@ metadata:
name: heat-engine
spec:
serviceName: heat-engine
{{- if .Values.development.enabled }}
replicas: 1
{{- else }}
replicas: {{ .Values.replicas.engine }}
{{- end }}
template:
metadata:
labels:
Expand Down
2 changes: 2 additions & 0 deletions heat/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
# Declare name/value pairs to be passed into your templates.
# name: value

development:
enabled: false

replicas:
api: 1
Expand Down
4 changes: 4 additions & 0 deletions horizon/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@ kind: Deployment
metadata:
name: horizon
spec:
{{- if .Values.development.enabled }}
replicas: 1
{{- else }}
replicas: {{ .Values.replicas }}
{{- end }}
revisionHistoryLimit: {{ .Values.upgrades.revision_history }}
strategy:
type: {{ .Values.upgrades.pod_replacement_strategy }}
Expand Down
3 changes: 3 additions & 0 deletions horizon/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
# Declare name/value pairs to be passed into your templates.
# name: value

development:
enabled: false

replicas: 1

images:
Expand Down
4 changes: 4 additions & 0 deletions memcached/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@ kind: Deployment
metadata:
name: memcached
spec:
{{- if .Values.development.enabled }}
replicas: 1
{{- else }}
replicas: {{ .Values.resources.memcached.replicas }}
{{- end }}
revisionHistoryLimit: {{ .Values.upgrades.revision_history }}
strategy:
type: {{ .Values.upgrades.pod_replacement_strategy }}
Expand Down
3 changes: 3 additions & 0 deletions memcached/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
# Declare name/value pairs to be passed into your templates.
# name: value

development:
enabled: false

images:
memcached: docker.io/memcached:1.4
pull_policy: "IfNotPresent"
Expand Down
6 changes: 5 additions & 1 deletion nova/templates/deployment-api-metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@ kind: Deployment
metadata:
name: nova-api-metadata
spec:
replicas: {{ .Values.control_replicas }}
{{- if .Values.development.enabled }}
replicas: 1
{{- else }}
replicas: {{ .Values.replicas.control }}
{{- end }}
revisionHistoryLimit: {{ .Values.upgrades.revision_history }}
strategy:
type: {{ .Values.upgrades.pod_replacement_strategy }}
Expand Down
6 changes: 5 additions & 1 deletion nova/templates/deployment-api-osapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@ kind: Deployment
metadata:
name: nova-api-osapi
spec:
replicas: {{ .Values.control_replicas }}
{{- if .Values.development.enabled }}
replicas: 1
{{- else }}
replicas: {{ .Values.replicas.control }}
{{- end }}
revisionHistoryLimit: {{ .Values.upgrades.revision_history }}
strategy:
type: {{ .Values.upgrades.pod_replacement_strategy }}
Expand Down
6 changes: 5 additions & 1 deletion nova/templates/deployment-conductor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@ kind: Deployment
metadata:
name: nova-conductor
spec:
replicas: {{ .Values.control_replicas }}
{{- if .Values.development.enabled }}
replicas: 1
{{- else }}
replicas: {{ .Values.replicas.control }}
{{- end }}
revisionHistoryLimit: {{ .Values.upgrades.revision_history }}
strategy:
type: {{ .Values.upgrades.pod_replacement_strategy }}
Expand Down
6 changes: 5 additions & 1 deletion nova/templates/deployment-consoleauth.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@ kind: Deployment
metadata:
name: nova-consoleauth
spec:
replicas: {{ .Values.control_replicas }}
{{- if .Values.development.enabled }}
replicas: 1
{{- else }}
replicas: {{ .Values.replicas.control }}
{{- end }}
revisionHistoryLimit: {{ .Values.upgrades.revision_history }}
strategy:
type: {{ .Values.upgrades.pod_replacement_strategy }}
Expand Down
6 changes: 5 additions & 1 deletion nova/templates/deployment-scheduler.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@ kind: Deployment
metadata:
name: nova-scheduler
spec:
replicas: {{ .Values.control_replicas }}
{{- if .Values.development.enabled }}
replicas: 1
{{- else }}
replicas: {{ .Values.replicas.control }}
{{- end }}
revisionHistoryLimit: {{ .Values.upgrades.revision_history }}
strategy:
type: {{ .Values.upgrades.pod_replacement_strategy }}
Expand Down
8 changes: 6 additions & 2 deletions nova/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,18 @@
# Declare name/value pairs to be passed into your templates.
# name: value

development:
enabled: false

labels:
control_node_selector_key: openstack-control-plane
control_node_selector_value: enabled
compute_node_selector_key: openstack-compute-node
compute_node_selector_value: enabled

control_replicas: 1
compute_replicas: 1
replicas:
control: 1
compute: 1

images:
db_init: quay.io/stackanetes/stackanetes-kolla-toolbox:newton
Expand Down

0 comments on commit e16ea80

Please sign in to comment.