-
Notifications
You must be signed in to change notification settings - Fork 605
backend/frontend/charts: make in-cluster context name configurable #4362
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
Merged
illume
merged 8 commits into
kubernetes-sigs:main
from
iamhalje:in-cluster-context-name
Jan 29, 2026
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
3a220ef
backend: kubeconfig: Pass in-cluster context name to kubeconfig
iamhalje 58f7d8a
backend: config: Add InClusterContextName to HeadlampConfig
iamhalje 7f7c03f
backend: config: Add in-cluster-context-name flag and env support
iamhalje b3605df
frontend: ui: Include cluster name in page title
iamhalje 3720f72
backend: config: Add InClusterContextName handling
iamhalje 3604645
backend: config: Remove shadow InClusterContextName
iamhalje 6884653
backend: config: Add tests and Helm support for InClusterContextName
iamhalje c7ccea1
charts: Add in-cluster-context-name config option
iamhalje File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
158 changes: 158 additions & 0 deletions
158
charts/headlamp/tests/expected_templates/httproute-enabled.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,158 @@ | ||
| --- | ||
| # Source: headlamp/templates/serviceaccount.yaml | ||
| apiVersion: v1 | ||
| kind: ServiceAccount | ||
| metadata: | ||
| name: headlamp | ||
| namespace: default | ||
| labels: | ||
| helm.sh/chart: headlamp-0.39.0 | ||
| app.kubernetes.io/name: headlamp | ||
| app.kubernetes.io/instance: headlamp | ||
| app.kubernetes.io/version: "0.39.0" | ||
| app.kubernetes.io/managed-by: Helm | ||
| --- | ||
| # Source: headlamp/templates/secret.yaml | ||
| apiVersion: v1 | ||
| kind: Secret | ||
| metadata: | ||
| name: oidc | ||
| namespace: default | ||
| type: Opaque | ||
| data: | ||
| --- | ||
| # Source: headlamp/templates/clusterrolebinding.yaml | ||
| apiVersion: rbac.authorization.k8s.io/v1 | ||
| kind: ClusterRoleBinding | ||
| metadata: | ||
| name: headlamp-admin | ||
| labels: | ||
| helm.sh/chart: headlamp-0.39.0 | ||
| app.kubernetes.io/name: headlamp | ||
| app.kubernetes.io/instance: headlamp | ||
| app.kubernetes.io/version: "0.39.0" | ||
| app.kubernetes.io/managed-by: Helm | ||
| roleRef: | ||
| apiGroup: rbac.authorization.k8s.io | ||
| kind: ClusterRole | ||
| name: cluster-admin | ||
| subjects: | ||
| - kind: ServiceAccount | ||
| name: headlamp | ||
| namespace: default | ||
| --- | ||
| # Source: headlamp/templates/service.yaml | ||
| apiVersion: v1 | ||
| kind: Service | ||
| metadata: | ||
| name: headlamp | ||
| namespace: default | ||
| labels: | ||
| helm.sh/chart: headlamp-0.39.0 | ||
| app.kubernetes.io/name: headlamp | ||
| app.kubernetes.io/instance: headlamp | ||
| app.kubernetes.io/version: "0.39.0" | ||
| app.kubernetes.io/managed-by: Helm | ||
| spec: | ||
| type: ClusterIP | ||
|
|
||
| ports: | ||
| - port: 80 | ||
| targetPort: http | ||
| protocol: TCP | ||
| name: http | ||
| selector: | ||
| app.kubernetes.io/name: headlamp | ||
| app.kubernetes.io/instance: headlamp | ||
| --- | ||
| # Source: headlamp/templates/deployment.yaml | ||
| # This block of code is used to extract the values from the env. | ||
| # This is done to check if the values are non-empty and if they are, they are used in the deployment.yaml. | ||
|
|
||
| apiVersion: apps/v1 | ||
| kind: Deployment | ||
| metadata: | ||
| name: headlamp | ||
| namespace: default | ||
| labels: | ||
| helm.sh/chart: headlamp-0.39.0 | ||
| app.kubernetes.io/name: headlamp | ||
| app.kubernetes.io/instance: headlamp | ||
| app.kubernetes.io/version: "0.39.0" | ||
| app.kubernetes.io/managed-by: Helm | ||
| spec: | ||
| replicas: 1 | ||
| selector: | ||
| matchLabels: | ||
| app.kubernetes.io/name: headlamp | ||
| app.kubernetes.io/instance: headlamp | ||
| template: | ||
| metadata: | ||
| labels: | ||
| app.kubernetes.io/name: headlamp | ||
| app.kubernetes.io/instance: headlamp | ||
| spec: | ||
| serviceAccountName: headlamp | ||
| automountServiceAccountToken: true | ||
| securityContext: | ||
| {} | ||
| containers: | ||
| - name: headlamp | ||
| securityContext: | ||
| privileged: false | ||
| runAsGroup: 101 | ||
| runAsNonRoot: true | ||
| runAsUser: 100 | ||
| image: "ghcr.io/headlamp-k8s/headlamp:v0.39.0" | ||
| imagePullPolicy: IfNotPresent | ||
|
|
||
| env: | ||
| args: | ||
| - "-in-cluster" | ||
| - "-in-cluster-context-name=main" | ||
| - "-plugins-dir=/headlamp/plugins" | ||
| # Check if externalSecret is disabled | ||
| ports: | ||
| - name: http | ||
| containerPort: 4466 | ||
| protocol: TCP | ||
| livenessProbe: | ||
| httpGet: | ||
| path: "/" | ||
| port: http | ||
| readinessProbe: | ||
| httpGet: | ||
| path: "/" | ||
| port: http | ||
| resources: | ||
| {} | ||
| --- | ||
| # Source: headlamp/templates/httproute.yaml | ||
| apiVersion: gateway.networking.k8s.io/v1 | ||
| kind: HTTPRoute | ||
| metadata: | ||
| name: headlamp | ||
| namespace: default | ||
| labels: | ||
| helm.sh/chart: headlamp-0.39.0 | ||
| app.kubernetes.io/name: headlamp | ||
| app.kubernetes.io/instance: headlamp | ||
| app.kubernetes.io/version: "0.39.0" | ||
| app.kubernetes.io/managed-by: Helm | ||
| app.kubernetes.io/component: ingress | ||
| annotations: | ||
| gateway.example.com/annotation: test | ||
| spec: | ||
| parentRefs: | ||
| - name: my-gateway | ||
| namespace: gateway-namespace | ||
| hostnames: | ||
| - headlamp.example.com | ||
| rules: | ||
| - matches: | ||
| - path: | ||
| type: PathPrefix | ||
| value: / | ||
| backendRefs: | ||
| - name: headlamp | ||
| port: 80 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.