aboutsummaryrefslogtreecommitdiffstats
path: root/kubernetes
diff options
context:
space:
mode:
authorAlexis de Talhouƫt <alexis.de_talhouet@bell.ca>2018-09-11 20:21:43 +0000
committerGerrit Code Review <gerrit@onap.org>2018-09-11 20:21:43 +0000
commitab078dfc13834fa23ac87a245837e76b3467a31b (patch)
tree67f4d22c377b5381c0144aed4e6c496d871d6128 /kubernetes
parent610d64e935a09f30efb00ce9622147e4ffe758ba (diff)
parent5ac8f28cbb10e01051b939239293e748d2ad0622 (diff)
Merge changes Ie5019f56,Id018a5f5
* changes: Network prefix configurable in Helm Fix not using storageClass issue
Diffstat (limited to 'kubernetes')
-rwxr-xr-xkubernetes/contrib/charts/netbox/charts/netbox-app/resources/config/provisioning/provision.sh32
-rwxr-xr-xkubernetes/contrib/charts/netbox/charts/netbox-app/templates/pvc.yaml2
-rwxr-xr-xkubernetes/contrib/charts/netbox/charts/netbox-app/values.yaml20
-rwxr-xr-xkubernetes/contrib/charts/netbox/charts/netbox-postgres/templates/pvc.yaml2
-rwxr-xr-xkubernetes/contrib/charts/netbox/charts/netbox-postgres/values.yaml14
5 files changed, 39 insertions, 31 deletions
diff --git a/kubernetes/contrib/charts/netbox/charts/netbox-app/resources/config/provisioning/provision.sh b/kubernetes/contrib/charts/netbox/charts/netbox-app/resources/config/provisioning/provision.sh
index f0439a50b3..adf10a1d0d 100755
--- a/kubernetes/contrib/charts/netbox/charts/netbox-app/resources/config/provisioning/provision.sh
+++ b/kubernetes/contrib/charts/netbox/charts/netbox-app/resources/config/provisioning/provision.sh
@@ -70,10 +70,10 @@ curl --silent -X POST \
-H 'Authorization: Token onceuponatimeiplayedwithnetbox20180814' \
-H 'Content-Type: application/json' \
-d '{
- "prefix": "192.168.20.0/24",
+ "prefix": "{{ .Values.service.vfw_protected_pool }}",
"site": 1,
"tenant": 1,
- "is_pool": true,
+ "is_pool": false,
"description": "IP Pool for protected network - vFW use case"
}'
@@ -83,10 +83,10 @@ curl --silent -X POST \
-H 'Authorization: Token onceuponatimeiplayedwithnetbox20180814' \
-H 'Content-Type: application/json' \
-d '{
- "prefix": "192.168.10.0/24",
+ "prefix": "{{ .Values.service.vfw_unprotected_pool }}",
"site": 1,
"tenant": 1,
- "is_pool": true,
+ "is_pool": false,
"description": "IP Pool for unprotected network - vFW use case"
}'
@@ -96,30 +96,10 @@ curl --silent -X POST \
-H 'Authorization: Token onceuponatimeiplayedwithnetbox20180814' \
-H 'Content-Type: application/json' \
-d '{
- "prefix": "10.0.0.0/8",
+ "prefix": "{{ .Values.service.vfw_mgmt_pool }}",
"site": 1,
"tenant": 1,
- "is_pool": true,
+ "is_pool": false,
"description": "IP Pool for ONAP - general purpose"
}'
-
-# Assign the first IP of the subnets in Netbox to avoid getting IP 0 from auto assignment.
-
-echo "Assign IP 0 from prefix for vFW protected network"
-curl --silent -X POST \
- http://{{ .Values.service.name }}:{{ .Values.service.internalPort }}/api/ipam/prefixes/1/available-ips/ \
- -H 'Authorization: Token onceuponatimeiplayedwithnetbox20180814' \
- -H 'Content-Type: application/json'
-
-echo "Assign IP 0 from prefix for vFW unprotected network"
-curl --silent -X POST \
- http://{{ .Values.service.name }}:{{ .Values.service.internalPort }}/api/ipam/prefixes/2/available-ips/ \
- -H 'Authorization: Token onceuponatimeiplayedwithnetbox20180814' \
- -H 'Content-Type: application/json'
-
-echo "Assign IP 0 from prefix for ONAP general purpose network"
-curl --silent -X POST \
- http://{{ .Values.service.name }}:{{ .Values.service.internalPort }}/api/ipam/prefixes/3/available-ips/ \
- -H 'Authorization: Token onceuponatimeiplayedwithnetbox20180814' \
- -H 'Content-Type: application/json'
diff --git a/kubernetes/contrib/charts/netbox/charts/netbox-app/templates/pvc.yaml b/kubernetes/contrib/charts/netbox/charts/netbox-app/templates/pvc.yaml
index 8fbd4544dc..3489049602 100755
--- a/kubernetes/contrib/charts/netbox/charts/netbox-app/templates/pvc.yaml
+++ b/kubernetes/contrib/charts/netbox/charts/netbox-app/templates/pvc.yaml
@@ -30,7 +30,7 @@ metadata:
{{ .Values.persistence.annotations | indent 4 }}
{{- end }}
spec:
-{{- if not .Values.persistence.storageClass -}}
+{{- if not .Values.persistence.storageClass }}
selector:
matchLabels:
name: {{ .Release.Name }}-{{ .Values.persistence.staticPvName }}
diff --git a/kubernetes/contrib/charts/netbox/charts/netbox-app/values.yaml b/kubernetes/contrib/charts/netbox/charts/netbox-app/values.yaml
index 49a96eb053..a1e330a260 100755
--- a/kubernetes/contrib/charts/netbox/charts/netbox-app/values.yaml
+++ b/kubernetes/contrib/charts/netbox/charts/netbox-app/values.yaml
@@ -64,6 +64,12 @@ service:
internalPort: 8001
portName: netbox-app
+ # The following subnet pool will be
+ # configured in Netbox by provisioning script.
+ vfw_protected_pool: 192.168.20.0/24
+ vfw_unprotected_pool: 192.168.10.0/24
+ vfw_mgmt_pool: 10.0.101.0/24
+
ingress:
enabled: false
@@ -80,11 +86,21 @@ persistence:
volumeReclaimPolicy: Retain
accessMode: ReadWriteMany
size: 100Mi
- storageClass: "nfs-dev-sc"
- # Names used for shared pv/pvcs across App & Nginx containers
+ # Uncomment the storageClass parameter to use an existing PV
+ # that will match the following class.
+ # When uncomment the storageClass, the PV is not created anymore.
+
+ # storageClass: "nfs-dev-sc"
+
staticPvName: netbox-static
+ # When using storage class, mountPath and mountSubPath are
+ # simply ignored.
+
+ mountPath: /dockerdata-nfs
+ mountSubPath: netbox/app
+
# probe configuration parameters
liveness:
initialDelaySeconds: 10
diff --git a/kubernetes/contrib/charts/netbox/charts/netbox-postgres/templates/pvc.yaml b/kubernetes/contrib/charts/netbox/charts/netbox-postgres/templates/pvc.yaml
index 77602117a6..30bba6da31 100755
--- a/kubernetes/contrib/charts/netbox/charts/netbox-postgres/templates/pvc.yaml
+++ b/kubernetes/contrib/charts/netbox/charts/netbox-postgres/templates/pvc.yaml
@@ -30,7 +30,7 @@ metadata:
{{ .Values.persistence.annotations | indent 4 }}
{{- end }}
spec:
-{{- if not .Values.persistence.storageClass -}}
+{{- if not .Values.persistence.storageClass }}
selector:
matchLabels:
name: {{ include "common.fullname" . }}
diff --git a/kubernetes/contrib/charts/netbox/charts/netbox-postgres/values.yaml b/kubernetes/contrib/charts/netbox/charts/netbox-postgres/values.yaml
index c54c3a68f5..39ff3edfaf 100755
--- a/kubernetes/contrib/charts/netbox/charts/netbox-postgres/values.yaml
+++ b/kubernetes/contrib/charts/netbox/charts/netbox-postgres/values.yaml
@@ -57,10 +57,22 @@ readiness:
persistence:
enabled: true
volumeReclaimPolicy: Retain
- storageClass: "nfs-dev-sc"
+
+ # Uncomment the storageClass parameter to use an existing PV
+ # that will match the following class.
+ # When uncomment the storageClass, the PV is not created anymore.
+
+ # storageClass: "nfs-dev-sc"
+
accessMode: ReadWriteMany
size: 1Gi
+ # When using storage class, mountPath and mountSubPath are
+ # simply ignored.
+
+ mountPath: /dockerdata-nfs
+ mountSubPath: netbox/postgres/data
+
service:
type: ClusterIP
name: netbox-postgres