Skip to content

Conversation

harishb93
Copy link

Description

i-78542 - Add an optional Kubernetes job that initializes a single tenant in the tenancy model.

Fixes # (issue)

Any Newly Introduced Dependencies

Please describe any newly introduced 3rd party dependencies in this change. List their name, license information and how they are used in the project.

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

Checklist:

  • I agree to use the APACHE-2.0 license for my code changes
  • I have not introduced any 3rd party dependency changes
  • I have performed a self-review of my code

@@ -0,0 +1,30 @@
# SPDX-FileCopyrightText: 2025 Intel Corporation

Check notice

Code scanning / Trivy

No HEALTHCHECK defined

Artifact: tenancy-init/Dockerfile Type: dockerfile Vulnerability DS026 Severity: LOW Message: Add HEALTHCHECK instruction in your Dockerfile Link: [DS026](https://avd.aquasec.com/misconfig/ds026)
johnoloughlin
johnoloughlin previously approved these changes Oct 10, 2025
Copy link
Contributor

@scottmbaker scottmbaker left a comment

Choose a reason for hiding this comment

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

Why is the dockerfile, makefile, etc., in the edge-manageability-framework repository rather than the orch-utils repository? Seems like most of the container images that serve multitenancy (for example, tenancy-api-mapping, tenancy-datamodel, keycloak-tenant-controller, etc) live over there.

securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
# image: "{{ .Values.image.registry }}/{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
image: localhost:5000/tenancy-init:25.2.1
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm assuming this will soon be changed to point to a published image?

}

func KeycloakLogin(ctx context.Context) (*gocloak.GoCloak, *gocloak.JWT, error) {
keycloakURL := "http://platform-keycloak.orch-platform.svc.cluster.local:8080"
Copy link
Contributor

Choose a reason for hiding this comment

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

any issues with this URL being hardcoded?


Tenant Initializer is a cloud-native job on the Edge Orchestrator. It
provides a bootstrap tenant during startup if the user wishes to avoid manually
creating a tenant using scripts or commands.
Copy link
Contributor

Choose a reason for hiding this comment

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

A note in the README about how the password is handled would be useful. I can see in the code that it creates a randomly generated password and then stores it in a secret. We should document that behavior in the readme, as well as the name of the secret.

}
log.Info().Msg("Project active watchers are ready.")

return nil
Copy link
Contributor

Choose a reason for hiding this comment

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

What about project roles for the admin user?

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.

4 participants