Skip to content
Snippets Groups Projects
Verified Commit 4c92c955 authored by Janne Mareike Koschinski's avatar Janne Mareike Koschinski
Browse files

fix: amp activation

parent 3acb6457
No related branches found
No related tags found
No related merge requests found
Pipeline #3016 passed
......@@ -2,5 +2,5 @@ apiVersion: v2
name: amp
description: Helm Chart for amp
type: application
version: 0.1.0
version: 0.2.2
appVersion: "latest"
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "amp-helm.fullname" . }}
labels:
{{- include "amp-helm.labels" . | nindent 4 }}
data:
auto-activate: "{{ .Values.config.autoActivate }}"
auto-update: "{{ .Values.config.autoUpdate }}"
main.sh: |-
#!/bin/bash -e
#set -o xtrace
set -e
echo "----------------------"
echo "Starting AMP-Dockerized..."
echo "----------------------"
echo "Note: This is an UNOFFICIAL IMAGE for CubeCoders AMP. This was created by the community, NOT CubeCoders."
echo "Please, DO NOT contact CubeCoders (Discord or otherwise) for technical support when using this image."
echo "They do not support nor endorse this image and will not help you."
echo "Instead, please direct support requests to https://github.com/MitchTalmadge/AMP-dockerized/issues."
echo "Thank you!!"
echo "----------------------"
echo ""
source /opt/entrypoint/utils.sh
source /opt/entrypoint/routines.sh
trap 'handle_error' ERR
trap_with_arg 'shutdown' INT TERM HUP QUIT KILL
# Migrate legacy vars
export AMP_LICENCE=${LICENCE:-${AMP_LICENCE:-"notset"}}
export AMP_MODULE=${MODULE:-${AMP_MODULE:-"ADS"}}
if [ ! -z "${NIGHTLY}" ]; then
export AMP_RELEASE_STREAM="Development"
fi
run_startup_script
create_amp_user
check_licence
configure_timezone
check_file_permissions
configure_main_instance
configure_release_stream
if [ ${AMP_AUTO_ACTIVATE} = "true" ]; then
echo "${AMP_LICENCE}" | run_amp_command "reactivateall"
else
echo "Skipping automatic reactivation."
fi
if [ ${AMP_AUTO_UPDATE} = "true" ]; then
upgrade_instances
else
echo "Skipping automatic updates."
fi
start_amp
# Sleep
echo "AMP is now running. Logs can be viewed through AMP web UI or at ampdata/instances/Main/AMP_Logs"
monitor_amp &
tail -f /dev/null &
wait $!
......@@ -6,6 +6,10 @@ metadata:
{{- include "amp-helm.labels" . | nindent 4 }}
spec:
replicas: {{ .Values.replicaCount }}
strategy:
rollingUpdate:
maxSurge: 0
maxUnavailable: "100%"
selector:
matchLabels:
{{- include "amp-helm.selectorLabels" . | nindent 6 }}
......@@ -29,6 +33,10 @@ spec:
{{- .Values.volume | nindent 10 }}
- name: tmp
emptyDir: {}
- name: config
configMap:
defaultMode: 511
name: {{ include "amp-helm.fullname" . }}
containers:
- name: {{ .Chart.Name }}
securityContext:
......@@ -51,6 +59,16 @@ spec:
secretKeyRef:
key: "admin-pass"
name: {{ include "amp-helm.fullname" . }}
- name: "AMP_AUTO_ACTIVATE"
valueFrom:
configMapKeyRef:
name: {{ include "amp-helm.fullname" . }}
key: auto-activate
- name: "AMP_AUTO_UPDATE"
valueFrom:
configMapKeyRef:
name: {{ include "amp-helm.fullname" . }}
key: auto-update
ports:
- name: sftp
containerPort: 2224
......@@ -93,6 +111,9 @@ spec:
name: data
- mountPath: "/tmp"
name: tmp
- mountPath: "/opt/entrypoint/main.sh"
name: config
subPath: "main.sh"
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
......
......@@ -14,6 +14,8 @@ config:
user: ""
pass: ""
license: ""
autoUpdate: false
autoActivate: false
service:
type: ClusterIP
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment