Skip to content

Commit 396cb48

Browse files
authored
Merge pull request #316 from aws-samples/staging
KeyCloak fixes
2 parents bbf43a3 + 52878be commit 396cb48

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

PetAdoptions/keycloak-setup.sh

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -594,6 +594,12 @@ function install_keycloak() {
594594
echo "Application 'keycloak' will be installed."
595595

596596
echo "Generating keycloak chart values..."
597+
# UPDATE: Disable resource presets and explicitly set container resources to avoid below warning.
598+
#
599+
# WARNING: There are "resources" sections in the chart not set. Using "resourcesPreset" is not recommended for production. For production installations, please set the following values according to your workload needs:
600+
#
601+
# * resources +info https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
602+
#
597603
KEYCLOAK_HELM_VALUES=$(cat <<EOF
598604
global:
599605
storageClass: "ebs-sc"
@@ -615,12 +621,26 @@ service:
615621
enabled: true
616622
ports:
617623
http: 80
624+
resourcesPreset: none
625+
resources:
626+
requests:
627+
cpu: "500m"
628+
memory: "512Mi"
629+
ephemeral-storage: "50Mi"
630+
limits:
631+
cpu: "750m"
632+
memory: "768Mi"
633+
ephemeral-storage: "2Gi"
618634
EOF
619635
)
620636

621637
echo "Executing helm install keycloak..."
622638
echo "---------------------------------------------------------------------------------------------"
639+
# UPDATE: Pin chart version to avoid error due to container security assessments feature
640+
# causing installation failure.
641+
# https://github.com/bitnami/charts/issues/30850
623642
echo "$KEYCLOAK_HELM_VALUES" | helm install keycloak bitnami/keycloak \
643+
--version 24.2.3 \
624644
--namespace $KEYCLOAK_NAMESPACE \
625645
-f -
626646
CMD_RESULT=$?
@@ -956,4 +976,4 @@ echo ""
956976
echo "**Note:** Retrieve saved workspace editor user password from AWS Secrets Manager by running following command."
957977
echo "aws secretsmanager get-secret-value --secret-id $SECRET_NAME --query \"SecretString\" --output text | jq -r '.[\"user-editor-password\"]'"
958978
echo ""
959-
echo "Setup done."
979+
echo "Setup done."

0 commit comments

Comments
 (0)