mirror of
https://github.com/Telecominfraproject/wlan-cloud-ucentralsec.git
synced 2025-11-01 11:17:51 +00:00
Compare commits
7 Commits
v2.4.0-RC5
...
v2.4.2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
95ea70d5c2 | ||
|
|
8b40de4631 | ||
|
|
b1740575a5 | ||
|
|
02057624de | ||
|
|
2e394d0513 | ||
|
|
24b022fa60 | ||
|
|
88922786ff |
@@ -78,7 +78,7 @@ RUN addgroup -S "$OWSEC_USER" && \
|
|||||||
RUN mkdir /openwifi
|
RUN mkdir /openwifi
|
||||||
RUN mkdir -p "$OWSEC_ROOT" "$OWSEC_CONFIG" && \
|
RUN mkdir -p "$OWSEC_ROOT" "$OWSEC_CONFIG" && \
|
||||||
chown "$OWSEC_USER": "$OWSEC_ROOT" "$OWSEC_CONFIG"
|
chown "$OWSEC_USER": "$OWSEC_ROOT" "$OWSEC_CONFIG"
|
||||||
RUN apk add --update --no-cache librdkafka mariadb-connector-c libpq unixodbc su-exec gettext ca-certificates libcurl curl-dev bash jq curl
|
RUN apk add --update --no-cache librdkafka mariadb-connector-c libpq unixodbc su-exec gettext ca-certificates libcurl curl-dev bash jq curl postgresql-client
|
||||||
COPY --from=builder /owsec/cmake-build/owsec /openwifi/owsec
|
COPY --from=builder /owsec/cmake-build/owsec /openwifi/owsec
|
||||||
COPY --from=builder /cppkafka/cmake-build/src/lib/* /lib/
|
COPY --from=builder /cppkafka/cmake-build/src/lib/* /lib/
|
||||||
COPY --from=builder /poco/cmake-build/lib/* /lib/
|
COPY --from=builder /poco/cmake-build/lib/* /lib/
|
||||||
@@ -90,6 +90,7 @@ COPY owsec.properties.tmpl /
|
|||||||
COPY wwwassets /dist/wwwassets
|
COPY wwwassets /dist/wwwassets
|
||||||
COPY templates /dist/templates
|
COPY templates /dist/templates
|
||||||
COPY docker-entrypoint.sh /
|
COPY docker-entrypoint.sh /
|
||||||
|
COPY wait-for-postgres.sh /
|
||||||
RUN wget https://raw.githubusercontent.com/Telecominfraproject/wlan-cloud-ucentral-deploy/main/docker-compose/certs/restapi-ca.pem \
|
RUN wget https://raw.githubusercontent.com/Telecominfraproject/wlan-cloud-ucentral-deploy/main/docker-compose/certs/restapi-ca.pem \
|
||||||
-O /usr/local/share/ca-certificates/restapi-ca-selfsigned.pem
|
-O /usr/local/share/ca-certificates/restapi-ca-selfsigned.pem
|
||||||
|
|
||||||
|
|||||||
1
helm/.gitignore
vendored
1
helm/.gitignore
vendored
@@ -1 +1,2 @@
|
|||||||
*.swp
|
*.swp
|
||||||
|
charts
|
||||||
|
|||||||
@@ -5,14 +5,14 @@ name: owsec
|
|||||||
version: 0.1.0
|
version: 0.1.0
|
||||||
dependencies:
|
dependencies:
|
||||||
- name: postgresql
|
- name: postgresql
|
||||||
repository: https://charts.bitnami.com/bitnami
|
repository: https://tip.jfrog.io/artifactory/tip-wlan-cloud-ucentral-helm/
|
||||||
version: 10.9.2
|
version: 10.9.2
|
||||||
condition: postgresql.enabled
|
condition: postgresql.enabled
|
||||||
- name: mysql
|
- name: mysql
|
||||||
repository: https://charts.bitnami.com/bitnami
|
repository: https://tip.jfrog.io/artifactory/tip-wlan-cloud-ucentral-helm/
|
||||||
version: 8.8.3
|
version: 8.8.3
|
||||||
condition: mysql.enabled
|
condition: mysql.enabled
|
||||||
- name: mariadb
|
- name: mariadb
|
||||||
repository: https://charts.bitnami.com/bitnami
|
repository: https://tip.jfrog.io/artifactory/tip-wlan-cloud-ucentral-helm/
|
||||||
version: 9.4.2
|
version: 9.4.2
|
||||||
condition: mariadb.enabled
|
condition: mariadb.enabled
|
||||||
|
|||||||
@@ -30,3 +30,13 @@ Create chart name and version as used by the chart label.
|
|||||||
{{- define "owsec.chart" -}}
|
{{- define "owsec.chart" -}}
|
||||||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
|
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- define "owsec.ingress.apiVersion" -}}
|
||||||
|
{{- if .Capabilities.APIVersions.Has "networking.k8s.io/v1" -}}
|
||||||
|
{{- print "networking.k8s.io/v1" -}}
|
||||||
|
{{- else if .Capabilities.APIVersions.Has "networking.k8s.io/v1beta1" -}}
|
||||||
|
{{- print "networking.k8s.io/v1beta1" -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- print "extensions/v1beta1" -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
{{- range $ingress, $ingressValue := .Values.ingresses }}
|
{{- range $ingress, $ingressValue := .Values.ingresses }}
|
||||||
{{- if $ingressValue.enabled }}
|
{{- if $ingressValue.enabled }}
|
||||||
---
|
---
|
||||||
apiVersion: extensions/v1beta1
|
apiVersion: {{ include "owsec.ingress.apiVersion" $root }}
|
||||||
kind: Ingress
|
kind: Ingress
|
||||||
metadata:
|
metadata:
|
||||||
name: {{ include "owsec.fullname" $root }}-{{ $ingress }}
|
name: {{ include "owsec.fullname" $root }}-{{ $ingress }}
|
||||||
@@ -36,9 +36,23 @@ spec:
|
|||||||
paths:
|
paths:
|
||||||
{{- range $ingressValue.paths }}
|
{{- range $ingressValue.paths }}
|
||||||
- path: {{ .path }}
|
- path: {{ .path }}
|
||||||
|
{{- if $root.Capabilities.APIVersions.Has "networking.k8s.io/v1" }}
|
||||||
|
pathType: {{ .pathType | default "ImplementationSpecific" }}
|
||||||
|
{{- end }}
|
||||||
backend:
|
backend:
|
||||||
|
{{- if $root.Capabilities.APIVersions.Has "networking.k8s.io/v1" }}
|
||||||
|
service:
|
||||||
|
name: {{ include "owsec.fullname" $root }}-{{ .serviceName }}
|
||||||
|
port:
|
||||||
|
{{- if kindIs "string" .servicePort }}
|
||||||
|
name: {{ .servicePort }}
|
||||||
|
{{- else }}
|
||||||
|
number: {{ .servicePort }}
|
||||||
|
{{- end }}
|
||||||
|
{{- else }}
|
||||||
serviceName: {{ include "owsec.fullname" $root }}-{{ .serviceName }}
|
serviceName: {{ include "owsec.fullname" $root }}-{{ .serviceName }}
|
||||||
servicePort: {{ .servicePort }}
|
servicePort: {{ .servicePort }}
|
||||||
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ fullnameOverride: ""
|
|||||||
images:
|
images:
|
||||||
owsec:
|
owsec:
|
||||||
repository: tip-tip-wlan-cloud-ucentral.jfrog.io/owsec
|
repository: tip-tip-wlan-cloud-ucentral.jfrog.io/owsec
|
||||||
tag: v2.4.0-RC5
|
tag: v2.4.0
|
||||||
pullPolicy: Always
|
pullPolicy: Always
|
||||||
# regcred:
|
# regcred:
|
||||||
# registry: tip-tip-wlan-cloud-ucentral.jfrog.io
|
# registry: tip-tip-wlan-cloud-ucentral.jfrog.io
|
||||||
@@ -50,6 +50,7 @@ ingresses:
|
|||||||
- restapi.chart-example.local
|
- restapi.chart-example.local
|
||||||
paths:
|
paths:
|
||||||
- path: /
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
serviceName: owsec
|
serviceName: owsec
|
||||||
servicePort: restapi
|
servicePort: restapi
|
||||||
|
|
||||||
|
|||||||
26
wait-for-postgres.sh
Executable file
26
wait-for-postgres.sh
Executable file
@@ -0,0 +1,26 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# wait-for-postgres.sh
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
host="$1"
|
||||||
|
shift
|
||||||
|
|
||||||
|
export PGUSER=$(grep 'storage.type.postgresql.username' $OWSEC_CONFIG/owsec.properties | awk -F '= ' '{print $2}')
|
||||||
|
export PGPASSWORD=$(grep 'storage.type.postgresql.password' $OWSEC_CONFIG/owsec.properties | awk -F '= ' '{print $2}')
|
||||||
|
|
||||||
|
until psql -h "$host" -c '\q'; do
|
||||||
|
>&2 echo "Postgres is unavailable - sleeping"
|
||||||
|
sleep 1
|
||||||
|
done
|
||||||
|
|
||||||
|
>&2 echo "Postgres is up - executing command"
|
||||||
|
|
||||||
|
if [ "$1" = '/openwifi/owsec' -a "$(id -u)" = '0' ]; then
|
||||||
|
if [ "$RUN_CHOWN" = 'true' ]; then
|
||||||
|
chown -R "$OWSEC_USER": "$OWSEC_ROOT" "$OWSEC_CONFIG"
|
||||||
|
fi
|
||||||
|
exec su-exec "$OWSEC_USER" "$@"
|
||||||
|
fi
|
||||||
|
|
||||||
|
exec "$@"
|
||||||
Reference in New Issue
Block a user