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

Team jobs #258

Merged
merged 112 commits into from
Feb 12, 2021
Merged

Team jobs #258

merged 112 commits into from
Feb 12, 2021

Conversation

0-sv
Copy link
Contributor

@0-sv 0-sv commented Dec 21, 2020

Inside the scope

See related issue on the right-hand side.
Task(s) (see issue):

  • Refactor Job/CronJob chart to enable the spec.enabled flag by default.
  • Team jobs basic functionality
    • Teams can enter jobs in jobs.demo.yaml.
    • Add functionality to Helmfile (helmfile-60.teams.yaml).

NOTE: the above mentioned tasks still assume that there still exists a "patternProperties object" of jobs. There will be a separate pull request for the refactoring of that task.

Outside the scope

I went a bit out of scope, I made these changes:

  • Modified the naming of 'tasks' to 'jobs'. It didn't make sense to me semantically. They are not 'tasks' by Kubernetes API definition. Note: I changed commands from npm run tasks:keycloak to npm run jobs:keycloak, did I break anything?
  • I changed the ordering of the 'if' of isMultitenant and hasKey $team services. The ordering was first like this:
{{- range $teamId, $team := $tc.teams }}
{{- if hasKey $team "services" }}
...
{{- if $v.otomi.isMultitenant }}        
...
{{- end }}
<-- new key over here? E.g. {{- if hasKey $team "jobs" }}
{{- end }}
<-- new key over here?
{{- end }}

In this ordering, you can't add another $team key because you can't place it outside the scope of if hasKey $team "services" and inside the scope of if $v.otomi.isMultitenant simultaneously. Anyhow, I'm not sure if it's supposed to be in the scope of if $v.otomi.isMultitenant, please review.

@0-sv 0-sv added the enhancement New feature or request label Dec 21, 2020
@0-sv 0-sv self-assigned this Dec 21, 2020
@0-sv 0-sv added this to Backlog in Otomi Container Platform via automation Dec 21, 2020
@0-sv 0-sv linked an issue Dec 21, 2020 that may be closed by this pull request
33 tasks
@0-sv 0-sv requested review from Morriz and j-zimnowoda and removed request for Morriz December 21, 2020 13:40
@0-sv 0-sv changed the title Task/204/spec enabled Refactor Job/CronJob chart spec.enabled and add team jobs basic functionality Dec 21, 2020
@0-sv
Copy link
Contributor Author

0-sv commented Dec 21, 2020

Note: in #248 there were still some open discussions.

@0-sv 0-sv requested a review from Morriz December 21, 2020 14:35
Copy link
Contributor

@Morriz Morriz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 tiny thingsz

.demo/env/clouds/aws/demo/jobs.demo.yaml Outdated Show resolved Hide resolved
bin/bootstrap.sh Outdated Show resolved Hide resolved
@0-sv 0-sv requested a review from Morriz February 11, 2021 13:18
@0-sv
Copy link
Contributor Author

0-sv commented Feb 11, 2021

I performed the following things since we last spoke @Morriz:

  • Made sure on the cluster that the secrets would be selected
  • Made sure on the cluster that the files will be available if the user specifies a path. It was wise to remove the key and path properties because the projected mountPath will be the full path that the user will see the files at if one looks into the container (together with @j-zimnowoda)
  • Merged the master branch with the conf test stuff, it caused some conflicts (together with @rawc0der)

I'm gonna take it easy and upgrade MacOS now. If you give any other comments I will do it on Monday with a clear head.

helmfile.d/helmfile-60.teams.yaml Show resolved Hide resolved
labels: {{- include "jobs.labels" $ | nindent 4 }}
annotations:
policy.otomi.io/ignore: psp-allowed-users
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So this is ignoring the check right now, for the purpose of finishing the story can we please improve it later?

@Morriz Morriz merged commit a0eafe3 into master Feb 12, 2021
Otomi Container Platform automation moved this from In Review to Done Feb 12, 2021
@delete-merged-branch delete-merged-branch bot deleted the task/204/spec-enabled branch February 12, 2021 15:24
Dunky13 pushed a commit that referenced this pull request May 27, 2021
Jobs configuration for teams allows (cron)jobs to be deployed either "Always" or "OnSpecChange".

Co-authored-by: Maurice Faber <maurice.faber@redkubes.com>
Ani1357 pushed a commit that referenced this pull request Oct 25, 2023
Jobs configuration for teams allows (cron)jobs to be deployed either "Always" or "OnSpecChange".

Co-authored-by: Maurice Faber <maurice.faber@redkubes.com>
@srodenhuis srodenhuis removed this from Done in Otomi Container Platform Jul 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Task Scrum task
Projects
None yet
Development

Successfully merging this pull request may close these issues.

K8s Jobs for teams
3 participants