Skip to content

Commit

Permalink
Merge "Added build-driver image to build vrouter kernel"
Browse files Browse the repository at this point in the history
  • Loading branch information
rrugge authored and opencontrail-ci-admin committed Feb 17, 2018
2 parents 8cc1e4f + 354e233 commit 0747e8c
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 196 deletions.
94 changes: 0 additions & 94 deletions contrail-vrouter/templates/daemonset-agent-only.yaml

This file was deleted.

@@ -1,5 +1,4 @@
{{- if not .Values.manifests.each_container_is_pod }}
{{- if .Values.manifests.daemonset_agent }}
{{- if .Values.manifests.daemonset_kernel }}
{{- $context := . }}
# host_os is a mandatory field
{{- $_ := required ".Values.node.host_os must be specified, valid values are ubuntu, centos" .Values.node.host_os }}
Expand All @@ -8,23 +7,23 @@
apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
name: contrail-vrouter-agent
name: contrail-vrouter-agent-kernel
spec:
template:
metadata:
labels:
{{ tuple $context "opencontrail" "contrail-agent" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }}
{{ tuple $context "opencontrail" "contrail-vrouter-agent-kernel" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }}
spec:
#Disable affinity for single node setup
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: {{ .Values.labels.agent.node_selector_key }}
- key: {{ .Values.labels.vrouter_kernel.node_selector_key }}
operator: In
values:
- {{ .Values.labels.agent.node_selector_value }}
- {{ .Values.labels.vrouter_kernel.node_selector_value }}
#Enable tolerations for single node setup
tolerations:
- key: node-role.kubernetes.io/master
Expand All @@ -33,9 +32,10 @@ spec:
hostNetwork: true
dnsPolicy: ClusterFirstWithHostNet
initContainers:
{{ tuple $context .Values.dependencies.agent nil | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
- name: contrail-agent-init-kernel
image: {{ .Values.images.tags.agent_vrouter_init_kernel | quote }}
{{ tuple $context .Values.dependencies.vrouter_kernel nil | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
{{- if eq $host_os "ubuntu"}}
- name: contrail-init-kernel
image: {{ .Values.images.tags.build_driver_init | quote }}
imagePullPolicy: {{ default "" .Values.images.imagePullPolicy | quote }}
securityContext:
privileged: true
Expand All @@ -45,15 +45,25 @@ spec:
- configMapRef:
name: configmap-vrouter-auth
volumeMounts:
{{- if eq $host_os "ubuntu"}}
- mountPath: /usr/src
name: usr-src
- mountPath: /lib/modules
name: lib-modules
{{- else if $host_os "centos" }}
- name: contrail-init-kernel
image: {{ .Values.images.tags.vrouter_init_kernel | quote }}
imagePullPolicy: {{ default "" .Values.images.imagePullPolicy | quote }}
securityContext:
privileged: true
envFrom:
- configMapRef:
name: configmap-vrouter
- configMapRef:
name: configmap-vrouter-auth
{{- end }}
containers:
- name: contrail-vrouter-agent
image: {{ .Values.images.tags.agent_vrouter | quote }}
- name: contrail-vrouter-kernel-agent
image: {{ .Values.images.tags.vrouter_agent | quote }}
imagePullPolicy: {{ default "" .Values.images.imagePullPolicy | quote }}
securityContext:
privileged: true
Expand All @@ -62,14 +72,11 @@ spec:
name: configmap-vrouter
- configMapRef:
name: configmap-vrouter-auth
env:
- name: PHYSICAL_INTERFACE
value: eth0
volumeMounts:
- mountPath: /usr/src
name: usr-src
- mountPath: /lib/modules
name: lib-modules
{{- if eq $host_os "centos"}}
- mountPath: /etc/sysconfig/network-scripts
name: network-scripts
{{- end }}
- mountPath: /var/lib/contrail/
name: var-lib-contrail
- mountPath: /var/log/contrail/
Expand Down Expand Up @@ -102,15 +109,18 @@ spec:
- mountPath: /etc/contrail/
name: etc-contrail
volumes:
- name: docker-unix-socket
hostPath:
path: /var/run
{{- if eq $host_os "ubuntu"}}
- name: usr-src
hostPath:
path: /usr/src
- name: lib-modules
hostPath:
path: /lib/modules
{{- else if $host_os "centos" }}
- name: network-scripts
hostPath:
path: /etc/sysconfig/network-scripts
{{- end }}
- name: var-lib-contrail
hostPath:
path: /var/lib/contrail/
Expand All @@ -124,4 +134,3 @@ spec:
hostPath:
path: /var/log/contrail/vrouter/
{{- end }}
{{- end }}
69 changes: 0 additions & 69 deletions contrail-vrouter/templates/daemonset-vrouter-nodemgr.yaml

This file was deleted.

17 changes: 7 additions & 10 deletions contrail-vrouter/values.yaml
@@ -1,27 +1,25 @@
images:
tags:
nodemgr: "docker.io/opencontrail/contrail-nodemgr:5.0.0-175-centos7-newton"
agent_vrouter: "docker.io/opencontrail/contrail-agent-vrouter:5.0.0-175-centos7-newton"
agent_vrouter_init_kernel: "docker.io/opencontrail/contrail-agent-vrouter-init-kernel:5.0.0-175-ubuntu16-newton"
build_driver_init: "docker.io/opencontrail/contrail-agent-build-driver-init:5.0.0-189-ubuntu16-newton"
vrouter_agent: "docker.io/opencontrail/contrail-agent-vrouter:5.0.0-175-centos7-newton"
vrouter_init_kernel: "docker.io/opencontrail/contrail-agent-vrouter-init-kernel:5.0.0-175-ubuntu16-newton"
dep_check: quay.io/stackanetes/kubernetes-entrypoint:v0.2.1
imagePullPolicy: "IfNotPresent"

labels:
agent:
vrouter_kernel:
node_selector_key: openstack-compute-node
node_selector_value: enabled
vrouter_nodemgr:
node_selector_key: openstack-compute-node
node_selector_value: enabled

dependencies:
vrouter_agent:
vrouter_kernel:
daemonset:
- contrail-config
vrouter_nodemgr:
daemonset:
- contrail-config
- contrail-vrouter-agent
- contrail-control

contrail_env:
CONTROLLER_NODES: 10.87.65.248
Expand Down Expand Up @@ -60,6 +58,5 @@ endpoints:
default: null

manifests:
each_container_is_pod: true
configmap_env: true
daemonset_agent: true
daemonset_kernel: true

0 comments on commit 0747e8c

Please sign in to comment.