-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Keycloak deployment #203
Keycloak deployment #203
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some nits and questions, ideally we could just use a base image and mount some scripts etc in as configmaps
echo "2. test" | ||
echo "3. prod" | ||
read -p "Enter your choice: " choice | ||
deploy_env=$(node -e 'console.log(["dev", "test", "prod"][process.argv[1] - 1])' $choice) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this validate an invalid choice?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't, I should have done this.
echo "The current k8s cluster is: ${current_k8s_cluster}" | ||
#TODO here we use the name in config/context, it might be problematic | ||
# maybe a cluster configmap is good to have: https://stackoverflow.com/questions/38242062/how-to-get-kubernetes-cluster-name-from-k8s-api | ||
is_cluster_ok=$(node ./lib/js/checkK8sClusterNameByEnv.js ${deploy_env} ${current_k8s_cluster}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't we use doctl to switch the context for the user?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a script in this repo that does that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the reminder
|
||
WORKDIR /opt/keycloak | ||
|
||
# Copy the theme |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could these be configmaps and env vars instead of a docker image?
</script> | ||
|
||
EOF | ||
sed -i "s/dev-k8s.treetracker.org/${RAW_CLIENT_URL}/g" index.html |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this could be a configmap too
spec: | ||
containers: | ||
- name: treetracker-keycloak | ||
image: dadiorchen/keycloak:1.5 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See above, could just use a configmap
@@ -0,0 +1,243 @@ | |||
<!doctype html> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this file used for something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It can be used as tool to test keycloak, by runing it locally
@mckornfield thanks! Can you explain your solution with configmap handling the docker customization: What I need in this case is: |
You could mount those files in as a configmap instead to the relevant directory, and use the base image |
@mckornfield that's a good idea, I will try it. |
Formally deploy keycloak to k8s
A customized docker image to change the UI sylte with Greenstand brand.