[WIFI-9155] Add: helm chart

Signed-off-by: Dmitry Dunaev <dmitry@opsfleet.com>
This commit is contained in:
Dmitry Dunaev
2022-06-20 19:40:38 +03:00
parent eb6c1fe58b
commit 3bc5f6d02f
6 changed files with 144 additions and 3 deletions

View File

@@ -28,6 +28,9 @@ dependencies:
- name: owsub
repository: "git+https://github.com/Telecominfraproject/wlan-cloud-userportal@helm?ref=main"
version: 0.1.0
- name: owrrm
repository: "git+https://github.com/Telecominfraproject/wlan-cloud-rrm@helm?ref=main"
version: 0.1.0
- name: kafka
repository: https://tip.jfrog.io/artifactory/tip-wlan-cloud-ucentral-helm/
version: 13.0.2

View File

@@ -31,6 +31,7 @@ usage () {
echo "- OWPROVUI_VERSION - OpenWIFI Provisioning Web UI version to deploy (will be used for Docker image tag and git branch for Helm chart if git deployment is required)" >&2;
echo "- OWANALYTICS_VERSION - OpenWIFI Analytics version to deploy (will be used for Docker image tag and git branch for Helm chart if git deployment is required)" >&2;
echo "- OWSUB_VERSION - OpenWIFI Subscription (Userportal) version to deploy (will be used for Docker image tag and git branch for Helm chart if git deployment is required)" >&2;
echo "- OWRRM_VERSION - OpenWIFI radio resource management service (RRM) version to deploy (will be used for Docker image tag and git branch for Helm chart if git deployment is required)" >&2;
echo >&2;
echo "Optional environment variables:" >&2;
echo >&2;
@@ -74,6 +75,7 @@ else
[ -z ${OWPROVUI_VERSION+x} ] && echo "OWPROVUI_VERSION is unset" >&2 && usage && exit 1
[ -z ${OWANALYTICS_VERSION+x} ] && echo "OWANALYTICS_VERSION is unset" >&2 && usage && exit 1
[ -z ${OWSUB_VERSION+x} ] && echo "OWSUB_VERSION is unset" >&2 && usage && exit 1
[ -z ${OWRRM_VERSION+x} ] && echo "OWRRM_VERSION is unset" >&2 && usage && exit 1
fi
## Environment specifics
[ -z ${NAMESPACE+x} ] && echo "NAMESPACE is unset" >&2 && usage && exit 1
@@ -102,6 +104,7 @@ export OWPROV_VERSION_TAG=$(echo ${OWPROV_VERSION} | tr '/' '-')
export OWPROVUI_VERSION_TAG=$(echo ${OWPROVUI_VERSION} | tr '/' '-')
export OWANALYTICS_VERSION_TAG=$(echo ${OWANALYTICS_VERSION} | tr '/' '-')
export OWSUB_VERSION_TAG=$(echo ${OWSUB_VERSION} | tr '/' '-')
export OWRRM_VERSION_TAG=$(echo ${OWRRM_VERSION} | tr '/' '-')
# Debug get bash version
bash --version >&2
@@ -124,6 +127,7 @@ if [[ "$DEPLOY_METHOD" == "git" ]]; then
sed -i '/wlan-cloud-owprov-ui@/s/ref=.*/ref='${OWPROVUI_VERSION}'\"/g' Chart.yaml
sed -i '/wlan-cloud-analytics@/s/ref=.*/ref='${OWANALYTICS_VERSION}'\"/g' Chart.yaml
sed -i '/wlan-cloud-userportal@/s/ref=.*/ref='${OWSUB_VERSION}'\"/g' Chart.yaml
sed -i '/wlan-cloud-rrm@/s/ref=.*/ref='${OWRRM_VERSION}'\"/g' Chart.yaml
fi
helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo update
@@ -152,10 +156,10 @@ for EXTRA_VALUE in ${EXTRA_VALUES_SPLITTED[*]}; do
done
if [[ "$USE_SEPARATE_OWGW_LB" == "true" ]]; then
export HAPROXY_SERVICE_DNS_RECORDS="sec-${NAMESPACE}.cicd.lab.wlan.tip.build\,fms-${NAMESPACE}.cicd.lab.wlan.tip.build\,prov-${NAMESPACE}.cicd.lab.wlan.tip.build\,analytics-${NAMESPACE}.cicd.lab.wlan.tip.build\,sub-${NAMESPACE}.cicd.lab.wlan.tip.build"
export HAPROXY_SERVICE_DNS_RECORDS="sec-${NAMESPACE}.cicd.lab.wlan.tip.build\,fms-${NAMESPACE}.cicd.lab.wlan.tip.build\,prov-${NAMESPACE}.cicd.lab.wlan.tip.build\,analytics-${NAMESPACE}.cicd.lab.wlan.tip.build\,sub-${NAMESPACE}.cicd.lab.wlan.tip.build\,rrm-${NAMESPACE}.cicd.lab.wlan.tip.build"
export OWGW_SERVICE_DNS_RECORDS="gw-${NAMESPACE}.cicd.lab.wlan.tip.build"
else
export HAPROXY_SERVICE_DNS_RECORDS="gw-${NAMESPACE}.cicd.lab.wlan.tip.build\,sec-${NAMESPACE}.cicd.lab.wlan.tip.build\,fms-${NAMESPACE}.cicd.lab.wlan.tip.build\,prov-${NAMESPACE}.cicd.lab.wlan.tip.build\,analytics-${NAMESPACE}.cicd.lab.wlan.tip.build\,sub-${NAMESPACE}.cicd.lab.wlan.tip.build"
export HAPROXY_SERVICE_DNS_RECORDS="gw-${NAMESPACE}.cicd.lab.wlan.tip.build\,sec-${NAMESPACE}.cicd.lab.wlan.tip.build\,fms-${NAMESPACE}.cicd.lab.wlan.tip.build\,prov-${NAMESPACE}.cicd.lab.wlan.tip.build\,analytics-${NAMESPACE}.cicd.lab.wlan.tip.build\,sub-${NAMESPACE}.cicd.lab.wlan.tip.build\,rrm-${NAMESPACE}.cicd.lab.wlan.tip.build"
export OWGW_SERVICE_DNS_RECORDS=""
fi

View File

@@ -102,5 +102,5 @@ haproxy:
service.beta.kubernetes.io/aws-load-balancer-ssl-cert: arn:aws:acm:us-east-2:289708231103:certificate/bfa89c7a-5b64-4a8a-bcfe-ffec655b5285 # TODO change certificate
service.beta.kubernetes.io/aws-load-balancer-ssl-ports: "16004,17004,16002,16003,17002,16005,17005,16001,17001,5912,5913,16009,16007"
service.beta.kubernetes.io/aws-load-balancer-type: nlb-ip
external-dns.alpha.kubernetes.io/hostname: "gw.cicd.lab.wlan.tip.build,sec.cicd.lab.wlan.tip.build,fms.cicd.lab.wlan.tip.build,prov.cicd.lab.wlan.tip.build,rtty.cicd.lab.wlan.tip.build,sub.cicd.lab.wlan.tip.build,analytics.cicd.lab.wlan.tip.build" # TODO change FQDNs
external-dns.alpha.kubernetes.io/hostname: "gw.cicd.lab.wlan.tip.build,sec.cicd.lab.wlan.tip.build,fms.cicd.lab.wlan.tip.build,prov.cicd.lab.wlan.tip.build,rtty.cicd.lab.wlan.tip.build,sub.cicd.lab.wlan.tip.build,analytics.cicd.lab.wlan.tip.build,rrm.cicd.lab.wlan.tip.build" # TODO change FQDNs

View File

@@ -102,6 +102,29 @@ owanalytics:
operator: "Exists"
effect: "NoSchedule"
owsub:
nodeSelector:
env: tests
tolerations:
- key: "tests"
operator: "Exists"
effect: "NoSchedule"
owrrm:
nodeSelector:
env: tests
tolerations:
- key: "tests"
operator: "Exists"
effect: "NoSchedule"
mysql:
nodeSelector:
env: tests
tolerations:
- key: "tests"
operator: "Exists"
effect: "NoSchedule"
kafka:
nodeSelector:
env: tests

View File

@@ -583,6 +583,75 @@ owsub:
secret:
secretName: {{ include "owsub.fullname" . }}-owsub-restapi-tls
owrrm:
fullnameOverride: owrrm
resources:
requests:
cpu: 1000m
memory: 2048Mi
limits:
cpu: 1000m
memory: 2048Mi
podAnnotations:
cluster-autoscaler.kubernetes.io/safe-to-evict: "false"
public_env_variables:
SELFSIGNED_CERTS: "true"
UCENTRALCONFIG_UCENTRALSECHOST: owsec-owsec
UCENTRALCONFIG_UCENTRALSECPORT: "17001"
UCENTRALCONFIG_PRIVATEENDPOINT: http://owrrm-owrrm:17007
UCENTRALSOCKETPARAMS_CONNECTTIMEOUTMS: "2000"
UCENTRALSOCKETPARAMS_SOCKETTIMEOUTMS: "15000"
UCENTRALSOCKETPARAMS_WIFISCANTIMEOUTMS: "45000"
KAFKACONFIG_BOOTSTRAPSERVER: kafka:9092
KAFKACONFIG_STATETOPIC: state
KAFKACONFIG_WIFISCANTOPIC: wifiscan
KAFKACONFIG_SERVICEEVENTSTOPIC: service_events
KAFKACONFIG_GROUPID: rrm-service
KAFKACONFIG_AUTOOFFSETRESET: latest
DATABASECONFIG_SERVER: owrrm-mysql:3306
DATABASECONFIG_DBNAME: owrrm
DATABASECONFIG_DATARETENTIONINTERVALDAYS: "14"
DATACOLLECTORPARAMS_UPDATEINTERVALMS: "5000"
DATACOLLECTORPARAMS_DEVICESTATSINTERVALSEC: "60"
DATACOLLECTORPARAMS_WIFISCANINTERVALSEC: "60"
DATACOLLECTORPARAMS_CAPABILITIESINTERVALSEC: "3600"
DATACOLLECTORPARAMS_EXECUTORTHREADCOUNT: "3"
CONFIGMANAGERPARAMS_UPDATEINTERVALMS: "60000"
CONFIGMANAGERPARAMS_CONFIGENABLED: "true"
CONFIGMANAGERPARAMS_CONFIGDEBOUNCEINTERVALSEC: "30"
MODELERPARAMS_WIFISCANBUFFERSIZE: "10"
APISERVERPARAMS_HTTPPORT: "16789"
APISERVERPARAMS_USEBASICAUTH: "false"
secret_env_variables:
DATABASECONFIG_USER: root
DATABASECONFIG_PASSWORD: openwifi
APISERVERPARAMS_BASICAUTHUSER: admin
APISERVERPARAMS_BASICAUTHPASSWORD: openwifi
volumes:
owrrm:
- name: restapi-ca
mountPath: /usr/local/share/ca-certificates/restapi-ca-selfsigned.pem
subPath: ca.crt
volumeDefinition: |
secret:
secretName: {{ include "owrrm.fullname" . }}-owrrm-restapi-tls
mysql:
enabled: true
fullnameOverride: "owrrm-mysql"
resources:
requests:
cpu: 100m
memory: 512Mi
limits:
cpu: 100m
memory: 512Mi
kafka:
commonAnnotations:

View File

@@ -54,6 +54,16 @@ owsub:
openwifi.kafka.enable: "true"
openwifi.kafka.brokerlist: kafka:9092
# OpenWIFI radio resource management (https://github.com/Telecominfraproject/wlan-cloud-rrm/)
owrrm:
fullnameOverride: owrrm
public_env_variables:
UCENTRALCONFIG_PRIVATEENDPOINT: http://owrrm-owrrm:17007
mysql:
enabled: true
# kafka (https://github.com/bitnami/charts/blob/master/bitnami/kafka/)
kafka:
enabled: true
@@ -219,6 +229,15 @@ haproxy:
protocol: TCP
port: 17006
targetPort: owsubrint
# owrrm
- name: owrrmrest
protocol: TCP
port: 16789
targetPort: owsubrest
- name: owrrmrint
protocol: TCP
port: 17007
targetPort: owsubrint
containerPorts:
# healthcheck
@@ -262,6 +281,11 @@ haproxy:
containerPort: 16006
- name: owsubrint
containerPort: 17006
# owsub
- name: owrrmrest
containerPort: 16789
- name: owrrmrint
containerPort: 17007
configuration: |
global
@@ -418,6 +442,23 @@ haproxy:
mode tcp
server svc_owsub_rest_internal owsub-owsub:17006
# owrrm
frontend front_owrrm_rest
bind :16789
mode tcp
default_backend back_owrrm_rest
backend back_owrrm_rest
mode tcp
server svc_owrrm_rest owrrm-owrrm:16789
frontend front_owrrm_rest_internal
bind :17007
mode tcp
default_backend back_owrrm_rest_internal
backend back_owrrm_rest_internal
mode tcp
server svc_owrrm_rest_internal owrrm-owrrm:17007
# Cert-manager RESTAPI certs
restapiCerts:
enabled: false
@@ -430,5 +471,6 @@ restapiCerts:
- owls-owls
- owanalytics-owanalytics
- owsub-owsub
- owrrm-owrrm
clusterDomain: cluster.local