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

Feature: basic and worker template types #3221

Merged
merged 4 commits into from
Jul 28, 2022
Merged

Feature: basic and worker template types #3221

merged 4 commits into from
Jul 28, 2022

Conversation

shreddedbacon
Copy link
Member

Checklist

  • Affected Issues have been mentioned in the Closing issues section
  • Documentation has been written/updated
  • PR title is ready for inclusion in changelog

Previously we have recommended people use the node or cli templates when building and deploying more generic or basic applications. Instead of suggesting these, adding two new types:

  • basic and basic-persistent - almost identical to node but allows for the service port to be changed using lagoon.service.port label on the docker-compose service. This is good for other languages like ruby, or go.
  • worker and worker-persistent - almost identical to cli but does not mount the project ssh key. This type is good for when you just need to process data without exposing a service or ingress.

Closing issues

closes #2525

@shreddedbacon shreddedbacon changed the title Add new basic and worker template types Feature: basic and worker template types Jul 26, 2022
@tobybellwood
Copy link
Member

How will aergia handle these new types? - https://github.com/amazeeio/aergia-controller/blob/main/resources/selectors.yaml

Presumably, we don't want worker pods idling? There's no way we can set a label on a deployment to stop it idling at a namespace level though?

@shreddedbacon
Copy link
Member Author

shreddedbacon commented Jul 28, 2022

How will aergia handle these new types? - https://github.com/amazeeio/aergia-controller/blob/main/resources/selectors.yaml

Presumably, we don't want worker pods idling? There's no way we can set a label on a deployment to stop it idling at a namespace level though?

Aergia will just idle them like any other pod, the selectors work on these labels which mostly exclude certain types from idling: https://github.com/amazeeio/aergia-controller/blob/main/resources/selectors.yaml#L1-L21

If someone did want to exclude these, the selectors are configurable in aergia via the helm chart, so someone could create their own selectors for idling rather than use our pre-defined one

Why would you want to keep a worker pod around and idle the others though? If the worker needs to work on something another pod has, it would probably crash (if built right). I see no problems with idling these like other pods. If a worker pod does need to not be idled, then there is the option to just exclude the environment from idling entirely too.

@tobybellwood
Copy link
Member

I think as long as these pods idle the same way as (non-cli) services, that's perfect - and reading the selectors confirms that!

@tobybellwood tobybellwood merged commit 57c17a4 into main Jul 28, 2022
@tobybellwood tobybellwood deleted the basic-templates branch July 28, 2022 04:01
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.

Create new lagoon type "worker" for long operating processes
2 participants