-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
docs: Improve helm for Version 3 #1340
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
Conversation
@dunglas There is a problem with the Linter checker on pull requests. See https://github.com/api-platform/docs/pull/1340/checks?check_run_id=2290796856 It worked 15 Minutes ago. Maybe a temporary rate limit? |
Related: #1104 |
Co-authored-by: Alan Poulain <contact@alanpoulain.eu>
Co-authored-by: Alan Poulain <contact@alanpoulain.eu>
Co-authored-by: Alan Poulain <contact@alanpoulain.eu>
Co-authored-by: Alan Poulain <contact@alanpoulain.eu>
Co-authored-by: Alan Poulain <contact@alanpoulain.eu>
@alanpoulain Thanks for the suggestions. I merged them. Can you maybe answer some of the question above? |
I think it's OK too.
Seems fine to me.
If the problem is not there anymore in Helm v3, I think it's OK to remove it.
It's probably better to offer the alternative too, isn't it? |
i don't know the planned behavior of 2.6. |
i changed the paragraph of running the command to create the schema of the database. now it is just a info how to access the container to run commands. it would be great if someone can review it and test a installation with these infos. |
Co-authored-by: Vincent <vincentchalamon@protonmail.com>
Co-authored-by: Vincent <vincentchalamon@protonmail.com>
Co-authored-by: Vincent <vincentchalamon@protonmail.com>
…fix parameter "corsAllowOrigin" for use under Windows
…grade --install". So you can reuse the command
Any progress on this topic? |
|
||
Firstly you need to update helm dependencies by running: | ||
helm dependency update ./helm/api-platform |
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 it work on your install? On api-platform/demo, I had to do the following;
helm repo add bitnami https://charts.bitnami.com/bitnami/
helm repo add stable https://charts.helm.sh/stable/
helm dependency build ./helm/api-platform
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 worked for us. It will update chart.lock and add the /charts/postgresql-10.3.18.tgz
But i need to check it. The gitlab-ci File has a part that scans dependencies and add it dynamically.
local pc:
➜ project git:(main) ✗ helm repo list
Error: no repositories to show
➜ project git:(main) ✗ helm dependency update ./helm/api-platform
Getting updates for unmanaged Helm repositories...
...Successfully got an update from the "https://charts.bitnami.com/bitnami/" chart repository
Saving 1 charts
Downloading postgresql from repo https://charts.bitnami.com/bitnami/
Deleting outdated charts
|
||
helm dependency update ./api/helm/api | ||
This will create a folder /charts/ and add all dependencies there. | ||
Actual this is [bitnami/postgresql](https://bitnami.com/stack/postgresql/helm), a file postgresql-[VERSION].tgz is created. |
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 don't understand the first part of this sentence...
### 4. Deploy your API to the container | ||
|
||
helm upgrade api-platform ./helm/api-platform --namespace=default \ | ||
--install \ |
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.
What about the ingress and mercure?
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.
The Company does not use mercure right know. (We removed vulcain and mercure for faster build times) So i do not have much knowledge here. The Domain for ingress was hardcodet. I have to compare Company code to api-platform code.
--set postgresql.url=pgsql://username:password@host/database?serverVersion=9.6 | ||
--set postgresql.url=pgsql://username:password@host/database?serverVersion=13 | ||
|
||
Finally, build the `pwa` (client and admin) JavaScript apps and [deploy them on a static |
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.
We don't use static version built of the PWA on api-platform, now we're using Next.js static generation. You can have a look at the demo PWA as an example.
But in a sense, you're still right as building the PWA and deploying it on a static server is still possible.
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 you please make a suggestion on how to change this? We are using an Angular Frontend not tied to API-Platform. I do not have knowledge in this topic.
--set "pwa.image.repository=gcr.io/test-api-platform/pwa" \ | ||
--set pwa.image.tag=latest \ | ||
--set php.appSecret='!ChangeMe!' \ | ||
--set postgresql.postgresqlPassword='!ChangeMe!' \ |
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.
While updating an existing database, this might cause issues. I don't recommend to change the database password on update. That's why I had to do the following on api-platform/demo:
if ! kubectl get namespace $GITHUB_REF_SLUG > /dev/null 2>&1; then
// install
else
// update
fi
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 do not recommend to change the database password with the upgrade. We have an Database on a server outside of kubernetes and the password stays the same. with upgrade --install there is only one command needed.
Co-authored-by: Vincent <vincentchalamon@protonmail.com>
Co-authored-by: Vincent <vincentchalamon@protonmail.com>
Co-authored-by: Kévin Dunglas <kevin@dunglas.fr>
Co-authored-by: Kévin Dunglas <kevin@dunglas.fr>
Co-authored-by: Kévin Dunglas <kevin@dunglas.fr>
Co-authored-by: Kévin Dunglas <kevin@dunglas.fr>
Co-authored-by: Vincent <vincentchalamon@protonmail.com>
Change name to 'main' Co-authored-by: Vincent <vincentchalamon@protonmail.com>
I suggest merging this as is, as it fixes most current issues. |
@dunglas OK for me. We can merge it, and fix the typos and errors in a new PR |
Improve helm for Version 3 (WIP)
There are some points to discuss in my point of view.
https://docs.docker.com/engine/release-notes/18.04/
actual: docker build -t gcr.io/test-api-platform/php -t gcr.io/test-api-platform/php:latest api --target api_platform_php
new: docker build -t gcr.io/test-api-platform/php:latest api --target api_platform_php
pwa
(client and admin) JavaScript apps and deploy them on a staticwebsite hosting service." ?
The PWA is now a Pod in Kubernetes.
The ServiceAccount default works in minikube. But it has errors in kubernetes for me.
I will open an issue after further investigation.
--set serviceAccount.create=false