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

feat: add organization labels to namespace and build/task pods #238

Merged
merged 1 commit into from
Dec 17, 2023

Conversation

shreddedbacon
Copy link
Member

@shreddedbacon shreddedbacon commented Nov 15, 2023

Checklist

  • Affected Issues have been mentioned in the Closing issues section
  • Documentation has been written/updated
  • PR title is ready for changelog and subsystem label(s) applied

Add new organization.lagoon.sh/id and organization.lagoon.sh/name labels to namespaces and build/task pods if the information is provided by Lagoon builds/tasks. These will only be provided to builds and tasks once uselagoon/lagoon#3596 is merged and released.

It also injects the following variables into the build pod itself, so that the build-deploy-tool will be able to use them:

  • LAGOON_ORGANIZATION_ID
  • LAGOON_ORGANIZATION_NAME

Part of work for uselagoon/lagoon#3595

closes #237

@shreddedbacon shreddedbacon force-pushed the organization-support branch 5 times, most recently from b04e049 to 0a37e4f Compare November 15, 2023 04:51
@shreddedbacon shreddedbacon marked this pull request as ready for review November 15, 2023 05:08
Copy link
Contributor

@bomoko bomoko left a comment

Choose a reason for hiding this comment

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

This looks good @shreddedbacon.

Just for completion's sake, are there any circumstances you can think of where the org ID comes through, but the Name doesn't, or vice versa?

I just ask because that's a distinct possibility given the repeated structure of the checks we're running:

if OrganizationObject isn't nil, then _separately_ test for ID and Name.

Just flagging it in case we somehow need to assert that both ID AND Name have to be present.

(although, I don't see why that would be something necessary - even though it feels like it would be a very odd case if it did happen)

@shreddedbacon
Copy link
Member Author

Just for completion's sake, are there any circumstances you can think of where the org ID comes through, but the Name doesn't, or vice versa?

With the proposed changes to the API it shouldn't happen. I'm happy to refactor it a bit though

Copy link
Contributor

@bomoko bomoko left a comment

Choose a reason for hiding this comment

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

Changes look good - shipit

@shreddedbacon shreddedbacon merged commit 0e99812 into main Dec 17, 2023
10 checks passed
@shreddedbacon shreddedbacon deleted the organization-support branch December 17, 2023 21:02
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.

Extend lagoonbuild and possibly lagoontask crds with support for organization information
2 participants