Skip to content
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

Minimal first version #2

Draft
wants to merge 42 commits into
base: main
Choose a base branch
from
Draft

Minimal first version #2

wants to merge 42 commits into from

Conversation

burnout87
Copy link
Collaborator

No description provided.

@burnout87 burnout87 changed the title Minimal version Minimal first version Oct 21, 2024
@burnout87
Copy link
Collaborator Author

I managed to start a deployment with one container, and I could see from the logs that this is up and running.

The problem I am currently facing and I am a bit stuck is about sending a request to the container, I am not sure the configuration I developed is correct:

  • the containerPort of the dev-oda-dispatcher in the deployment is set to the port assigned to the dispatcher (eg 8001)
    ports:
    - containerPort: 8001
  • I added a extraPortMappings config for the kind cluster in order to to port forward to the kind node (eg 8080 to 8001)
    extraPortMappings:
    - containerPort: 8001
    hostPort: 8080

I am clearly missing a part of the configuration: do I have to create a dedicated service in charge of routing the requests to the appropriate container?

@volodymyrss
Copy link
Member

To test locally, it is easier to use 'kubectl port-forward'.

Inside the cluster, dispatcher can access your new pod through a service you need to create.
From outside, the service should be accessed through dispatcher.

@burnout87
Copy link
Collaborator Author

To test locally, it is easier to use 'kubectl port-forward'.

Thanks, this worked for me and I could finally test it locally

Inside the cluster, dispatcher can access your new pod through a service you need to create. From outside, the service should be accessed through dispatcher.

Ok, I will define also a specific service

@burnout87 burnout87 linked an issue Nov 1, 2024 that may be closed by this pull request
2 tasks
@burnout87
Copy link
Collaborator Author

With the last development:

  • defined a container specific for the postgresql DB
    • the transfer of the data from the MySQL product gallery DB is then necessary (using the pgloader utility)
  • added as part of the deployment within the kind cluster
  • set an extraMounts within the kind cluster (only for kind) for the dispatcher config file

@burnout87
Copy link
Collaborator Author

I am missing the following part:

Within the dispatcher-config configMap, certain entries are secret (eg secret_key and vo_psql_pg_password). How are those supposed to be injected?

@burnout87
Copy link
Collaborator Author

burnout87 commented Dec 6, 2024

Within the dispatcher-config configMap, certain entries are secret (eg secret_key and vo_psql_pg_password). How are those supposed to be injected?

Inspired by create-secret , I figured it out.

The dispatcher config (for the dispatcher container), as well as the postgres password, are included in a secret

@burnout87
Copy link
Collaborator Author

Following the doc in https://hub.docker.com/_/postgres/ , I developed an entrypoint script that creates the DB, schema and installs the extension pgsphere.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add a simple application deployment
2 participants