Commit 04afee1c authored by Jorge Moratinos's avatar Jorge Moratinos
Browse files

Merge branch 'OCF164-improve-helm-scripts-to-support-release-3' into 'staging'

Resolve "Improve helm scripts to support release 3"

Closes #164

See merge request !147
parents cdb43f1c c1c83487
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -56,7 +56,7 @@ spec:
            {{- toYaml . | nindent 12 }}
            {{- toYaml . | nindent 12 }}
          {{- end }}
          {{- end }}
        - name: mongo-helper
        - name: mongo-helper
          image: busybox
          image: "{{ .Values.busybox.repository }}:{{ .Values.busybox.tag | default .Chart.AppVersion }}"
          command:
          command:
            - sh
            - sh
            - -c
            - -c
+6 −0
Original line number Original line Diff line number Diff line
@@ -10,6 +10,12 @@ image:
  # Overrides the image tag whose default is the chart appVersion.
  # Overrides the image tag whose default is the chart appVersion.
  tag: "6.0.2"
  tag: "6.0.2"


busybox:
  repository: busybox
  pullPolicy: Always
  # Overrides the image tag whose default is the chart appVersion.
  tag: "1.37.0"

imagePullSecrets: []
imagePullSecrets: []
nameOverride: ""
nameOverride: ""
fullnameOverride: ""
fullnameOverride: ""
+26 −6
Original line number Original line Diff line number Diff line
#!/bin/bash
#!/bin/bash
source $(dirname "$(readlink -f "$0")")/variables.sh

# Capture the first parameter as a possible environment
ENVIRONMENT="dev"
if [[ "$1" != -* && -n "$1" ]]; then
  ENVIRONMENT="$1"
  shift
fi

# Load variables for the selected environment
source "$(dirname "$0")/variables.sh" "$ENVIRONMENT"


# User to create
# User to create
TOTAL_USERS=1
TOTAL_USERS=1
@@ -7,11 +16,20 @@ USERNAME_PREFIX=
USER_PASSWORD=
USER_PASSWORD=


help() {
help() {
  echo "Usage: $1 <options>"
  echo "Usage: $0 [environment] [options]"
  echo "       -u : User prefix to use"
  echo ""
  echo "       -p : Password to set for user"
  echo "  environment         Optional. Environment name to use (e.g. dev, prod)."
  echo "       -t : Total user to create (default 1)"  
  echo "                      If not specified, 'dev' will be used by default."
  echo "       -h : show this help"
  echo ""
  echo "Options:"
  echo "  -u <prefix>         User prefix to use (required)"
  echo "  -p <password>       Password to set for user (required)"
  echo "  -t <total>          Total users to create (default: 1)"
  echo "  -h                  Show this help message"
  echo ""
  echo "Examples:"
  echo "  $0 prod -u testuser -p pass123 -t 5"
  echo "  $0 -u testuser -p pass123"
  exit 1
  exit 1
}
}


@@ -142,4 +160,6 @@ docker run -ti --rm --network="host" \
  --variable TOTAL_USERS:$TOTAL_USERS \
  --variable TOTAL_USERS:$TOTAL_USERS \
  --variable USERNAME_PREFIX:$USERNAME_PREFIX \
  --variable USERNAME_PREFIX:$USERNAME_PREFIX \
  --variable USER_PASSWORD:$USER_PASSWORD \
  --variable USER_PASSWORD:$USER_PASSWORD \
  --variable REGISTER_ADMIN_USER:$REGISTER_ADMIN_USER \
  --variable REGISTER_ADMIN_PASSWORD:$REGISTER_ADMIN_PASSWORD \
  --include create-users
  --include create-users
+0 −0

Empty file added.

+19 −0
Original line number Original line Diff line number Diff line
# Setup kubeconfig to be used
export CUSTOM_KUBECONFIG="cluster-example.kubeconfig"

# Setup Vault parameters to deploy on this environment
export VAULT_HOSTNAME=vault.example.production
export DOMAIN1=*.example.production
export DOMAIN2=*.example.staging
export DOMAIN3=*.example.dev

# Setup Monitoring parameters
export PROMETHEUS_HOSTNAME=prometheus.example.production

# Setup OpenCAPIF parameters
export CAPIF_HOSTNAME="capif.example.staging"
export REGISTER_HOSTNAME="register.example.staging"
export CAPIF_NAMESPACE=ocf-capif
export CAPIF_CI_ENV_ENDPOINT=staging
export CAPIF_DOMAIN=example.staging
export CAPIF_IMAGE_TAG="v3.0.0-release"
Loading