Skip to content

Commit

Permalink
Critical fixes required for 0.1.0 tagging
Browse files Browse the repository at this point in the history
* Add imagePullPolicy to ceph with default

* Add imagePullPolicy to mariadb with default

* Add missing imagePullPolicies to nova with defaults

* Remove malfunctioning daemonset dependency from nova

* Add missing neutron endpoint definition to nova values

* Force v4 networking in ceph.  Repeated bootstrapping
  is unreliable without this.

* Update cinder dependencies based on testing

* Optonal Horizon NodePort

* Revert iptables stub for nova-api-osapi because
  we lack permississions to overwrite /sbin/iptables. We
  will continue to run in a privileged security context
  until we have a working solution.
  • Loading branch information
alanmeadows committed Jan 12, 2017
1 parent 0bb12fb commit db0db42
Show file tree
Hide file tree
Showing 23 changed files with 70 additions and 61 deletions.
2 changes: 1 addition & 1 deletion ceph/templates/daemonset-osd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ spec:
containers:
- name: osd-pod
image: {{ .Values.images.daemon }}
imagePullPolicy: Always
imagePullPolicy: {{ .Values.images.pull_policy }}
volumeMounts:
- name: devices
mountPath: /dev
Expand Down
1 change: 1 addition & 0 deletions ceph/templates/deployment-mds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ spec:
containers:
- name: ceph-mon
image: {{ .Values.images.daemon }}
imagePullPolicy: {{ .Values.images.pull_policy }}
ports:
- containerPort: 6800
env:
Expand Down
6 changes: 3 additions & 3 deletions ceph/templates/deployment-moncheck.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,16 @@ spec:
containers:
- name: ceph-mon
image: {{ .Values.images.daemon }}
imagePullPolicy: Always
imagePullPolicy: {{ .Values.images.pull_policy }}
ports:
- containerPort: 6789
env:
- name: CEPH_DAEMON
value: MON_HEALTH
- name: KV_TYPE
value: k8s
- name: MON_IP_AUTO_DETECT
value: "1"
- name: NETWORK_AUTO_DETECT
value: "4"
- name: CLUSTER
value: ceph
volumeMounts:
Expand Down
1 change: 1 addition & 0 deletions ceph/templates/deployment-rgw.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ spec:
containers:
- name: ceph-rgw
image: {{ .Values.images.daemon }}
imagePullPolicy: {{ .Values.images.pull_policy }}
ports:
- containerPort: {{ .Values.network.port.rgw_target }}
env:
Expand Down
4 changes: 2 additions & 2 deletions ceph/templates/statefulset-mon.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ spec:
containers:
- name: ceph-mon
image: {{ .Values.images.daemon }}
imagePullPolicy: Always
imagePullPolicy: {{ .Values.images.pull_policy }}
lifecycle:
preStop:
exec:
Expand All @@ -73,7 +73,7 @@ spec:
- name: KV_TYPE
value: k8s
- name: NETWORK_AUTO_DETECT
value: "1"
value: "4"
- name: CLUSTER
value: ceph
volumeMounts:
Expand Down
1 change: 1 addition & 0 deletions ceph/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ service:

images:
daemon: quay.io/attcomdev/ceph-daemon:latest
pull_policy: IfNotPresent

labels:
node_selector_key: ceph-storage
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 @@ -33,6 +33,10 @@ spec:
"name": "DEPENDENCY_SERVICE",
"value": "{{ include "joinListWithColon" .Values.dependencies.volume.service }}"
},
{
"name": "DEPENDENCY_JOBS",
"value": "{{ include "joinListWithColon" .Values.dependencies.volume.jobs }}"
},
{
"name": "COMMAND",
"value": "echo done"
Expand Down
12 changes: 10 additions & 2 deletions cinder/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ labels:

images:
dep_check: quay.io/stackanetes/kubernetes-entrypoint:v0.1.0
db_init: quay.io/stackanetes/stackanetes-kolla-toolbox:newton
db_sync: quay.io/stackanetes/stackanetes-cinder-api:newton
ks_user: quay.io/stackanetes/stackanetes-kolla-toolbox:newton
ks_service: quay.io/stackanetes/stackanetes-kolla-toolbox:newton
ks_endpoints: quay.io/stackanetes/stackanetes-kolla-toolbox:newton
db_init: quay.io/stackanetes/stackanetes-kolla-toolbox:newton
db_sync: quay.io/stackanetes/stackanetes-cinder-api:newton
api: quay.io/stackanetes/stackanetes-cinder-api:newton
scheduler: quay.io/stackanetes/stackanetes-cinder-scheduler:newton
volume: quay.io/stackanetes/stackanetes-cinder-volume:newton
Expand Down Expand Up @@ -130,10 +130,18 @@ dependencies:
- mariadb
- keystone-api
volume:
jobs:
- cinder-db-sync
- cinder-ks-user
- cinder-ks-endpoints
service:
- keystone-api
- cinder-api
scheduler:
jobs:
- cinder-db-sync
- cinder-ks-user
- cinder-ks-endpoints
service:
- keystone-api
- cinder-api
Expand Down
12 changes: 12 additions & 0 deletions horizon/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,18 @@ metadata:
name: horizon
spec:
ports:
{{ if .Values.network.enable_node_port }}
- nodePort: {{ .Values.network.node_port }}
port: {{ .Values.network.port }}
protocol: TCP
targetPort: {{ .Values.network.port }}
{{ else }}
- port: {{ .Values.network.port }}
protocol: TCP
targetPort: {{ .Values.network.port }}
{{ end }}
selector:
app: horizon
{{ if .Values.network.enable_node_port }}
type: NodePort
{{ end }}
2 changes: 2 additions & 0 deletions horizon/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ labels:

network:
port: 80
node_port: 30000
enable_node_port: false

local_settings:
horizon_secret_key: 9aee62c0-5253-4a86-b189-e0fb71fa503c
Expand Down
2 changes: 1 addition & 1 deletion mariadb/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ spec:
containers:
- name: {{ .Values.service_name }}
image: {{ .Values.images.mariadb }}
imagePullPolicy: Always
imagePullPolicy: {{ .Values.images.pull_policy }}
env:
- name: INTERFACE_NAME
value: "eth0"
Expand Down
2 changes: 1 addition & 1 deletion mariadb/templates/job-seed.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ spec:
containers:
- name: mariadb-init
image: {{ .Values.images.mariadb }}
imagePullPolicy: Always
imagePullPolicy: {{ .Values.images.pull_policy }}
env:
- name: INTERFACE_NAME
value: "eth0"
Expand Down
1 change: 1 addition & 0 deletions mariadb/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ service_name: mariadb

images:
mariadb: quay.io/stackanetes/stackanetes-mariadb:newton
pull_policy: IfNotPresent

volume:
class_path: volume.beta.kubernetes.io/storage-class
Expand Down
23 changes: 0 additions & 23 deletions nova/templates/bin/_start-osapi.sh.tpl

This file was deleted.

2 changes: 0 additions & 2 deletions nova/templates/configmap-bin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ data:
{{ tuple "bin/_db-sync.sh.tpl" . | include "template" | indent 4 }}
init.sh: |
{{ tuple "bin/_init.sh.tpl" . | include "template" | indent 4 }}
start-osapi.sh: |
{{ tuple "bin/_start-osapi.sh.tpl" . | include "template" | indent 4 }}
post.sh: |
{{ tuple "bin/_post.sh.tpl" . | include "template" | indent 4 }}
libvirt.sh: |
Expand Down
6 changes: 1 addition & 5 deletions nova/templates/daemonset-compute.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,6 @@ spec:
"name": "DEPENDENCY_JOBS",
"value": "{{ include "joinListWithColon" .Values.dependencies.compute.jobs }}"
},
{
"name": "DEPENDENCY_DAEMONSET",
"value": "{{ include "joinListWithColon" .Values.dependencies.compute.daemonset }}"
},
{
"name": "COMMAND",
"value": "echo done"
Expand All @@ -54,7 +50,7 @@ spec:
containers:
- name: nova-compute
image: {{ .Values.image.compute }}
imagePullPolicy: Always
imagePullPolicy: {{ .Values.image.pull_policy }}
securityContext:
privileged: true
command:
Expand Down
2 changes: 1 addition & 1 deletion nova/templates/daemonset-libvirt.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ spec:
containers:
- name: nova-libvirt
image: {{ .Values.image.libvirt }}
imagePullPolicy: Always
imagePullPolicy: {{ .Values.image.pull_policy }}
securityContext:
privileged: true
command:
Expand Down
14 changes: 8 additions & 6 deletions nova/templates/deployment-api-metadata.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: nova-api
name: nova-api-metadata
spec:
replicas: {{ .Values.control_replicas }}
revisionHistoryLimit: {{ .Values.upgrades.revision_history }}
Expand All @@ -15,7 +15,7 @@ spec:
template:
metadata:
labels:
app: nova-api
app: nova-api-metadata
annotations:
configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "hash" }}
configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "hash" }}
Expand Down Expand Up @@ -52,20 +52,22 @@ spec:
nodeSelector:
{{ .Values.labels.control_node_selector_key }}: {{ .Values.labels.control_node_selector_value }}
containers:
- name: nova-api
- name: nova-api-metadata
image: {{ .Values.image.api }}
imagePullPolicy: {{ .Values.image.pull_policy }}
# https://bugs.launchpad.net/kolla-mesos/+bug/1546007
securityContext:
capabilities:
add:
- NET_ADMIN
command:
- nova-api-metadata --config-file=/etc/nova/nova.conf
- nova-api-metadata
- --config-file=/etc/nova/nova.conf
ports:
- containerPort: {{ .Values.network.port.metadata }}
readinessProbe:
tcpSocket:
port: {{ .Values.network.port.osapi }}
port: {{ .Values.network.port.metadata }}
volumeMounts:
- name: novaconf
mountPath: /etc/nova/nova.conf
Expand All @@ -76,4 +78,4 @@ spec:
name: nova-etc
items:
- key: nova.conf
path: nova.conf
path: nova.conf
23 changes: 9 additions & 14 deletions nova/templates/deployment-api-osapi.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: nova-osapi
name: nova-api-osapi
spec:
replicas: {{ .Values.control_replicas }}
revisionHistoryLimit: {{ .Values.upgrades.revision_history }}
Expand Down Expand Up @@ -52,11 +52,16 @@ spec:
nodeSelector:
{{ .Values.labels.control_node_selector_key }}: {{ .Values.labels.control_node_selector_value }}
containers:
- name: nova-osapi
- name: nova-api-osapi
image: {{ .Values.image.api }}
imagePullPolicy: {{ .Values.image.pull_policy }}
securityContext:
capabilities:
add:
- NET_ADMIN
command:
- bash
- /tmp/start-osapi.sh
- nova-api
- --config-file=/etc/nova/nova.conf
ports:
- containerPort: {{ .Values.network.port.osapi }}
readinessProbe:
Expand All @@ -66,20 +71,10 @@ spec:
- name: novaconf
mountPath: /etc/nova/nova.conf
subPath: nova.conf
volumeMounts:
- name: startsh
mountPath: /tmp/start-osapi.sh
subPath: start-osapi.sh
volumes:
- name: novaconf
configMap:
name: nova-etc
items:
- key: nova.conf
path: nova.conf
- name: startsh
configMap:
name: nova-bin
items:
- key: start-osapi.sh
path: start-osapi.sh
1 change: 1 addition & 0 deletions nova/templates/deployment-conductor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ spec:
containers:
- name: nova-conductor
image: {{ .Values.image.conductor }}
imagePullPolicy: {{ .Values.image.pull_policy }}
command:
- nova-conductor
- --config-file
Expand Down
1 change: 1 addition & 0 deletions nova/templates/deployment-consoleauth.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ spec:
containers:
- name: nova-consoleauth
image: {{ .Values.image.consoleauth }}
imagePullPolicy: {{ .Values.image.pull_policy }}
command:
- nova-consoleauth
- --config-file
Expand Down
1 change: 1 addition & 0 deletions nova/templates/deployment-scheduler.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ spec:
containers:
- name: nova-scheduler
image: {{ .Values.image.scheduler }}
imagePullPolicy: {{ .Values.image.pull_policy }}
command:
- nova-scheduler
- --config-file
Expand Down
8 changes: 8 additions & 0 deletions nova/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -209,3 +209,11 @@ endpoints:
port:
admin: 35357
public: 5000
neutron:
hosts:
default: neutron-server
path: null
type: network
scheme: 'http'
port:
api: 9696

0 comments on commit db0db42

Please sign in to comment.