Skip to content

Commit

Permalink
Fix agentNamespace in spoke
Browse files Browse the repository at this point in the history
Signed-off-by: Tamal Saha <[email protected]>
  • Loading branch information
tamalsaha committed Nov 13, 2023
1 parent 0ca0904 commit 1a47b4d
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 10 deletions.
3 changes: 3 additions & 0 deletions apis/installer/v1alpha1/cluster_manager_spoke_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ type ClusterManagerSpokeSpec struct {
// ClusterName: the name of the joined cluster on the hub
ClusterName string `json:"clusterName"`

// AgentNamespace: the namespace to deploy the agent
AgentNamespace string `json:"agentNamespace"`

// SpokeHub: Hub information
// +optional
Hub SpokeHub `json:"hub"`
Expand Down
1 change: 1 addition & 0 deletions charts/cluster-manager-spoke/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ The following table lists the configurable parameters of the `cluster-manager-sp
| Parameter | Description | Default |
|----------------------------------------|-------------|----------------------------------------------|
| clusterName | | <code>""</code> |
| agentNamespace | | <code>""</code> |
| hub.apiServer | | <code>""</code> |
| hub.kubeConfig | | <code>""</code> |
| klusterlet.name | | <code>klusterlet</code> |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: v1
kind: Secret
metadata:
name: bootstrap-hub-kubeconfig
namespace: {{ .Release.Namespace }}
namespace: {{ required "A valid .agentNamespace entry required!" .Values.agentNamespace }}
type: Opaque
data:
kubeconfig: {{ required "A valid .hub.kubeConfig entry required!" .Values.hub.kubeConfig }}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ apiVersion: v1
kind: Secret
metadata:
name: external-managed-kubeconfig
namespace: {{ .Release.Namespace }}
namespace: {{ required "A valid .agentNamespace entry required!" .Values.agentNamespace }}
type: Opaque
data:
kubeconfig: {{ .Values.managedKubeconfig }}
Expand Down
9 changes: 9 additions & 0 deletions charts/cluster-manager-spoke/templates/namespace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,12 @@ metadata:
annotations:
workload.openshift.io/allowed: "management"
name: open-cluster-management

---

apiVersion: v1
kind: Namespace
metadata:
annotations:
workload.openshift.io/allowed: "management"
name: {{ required "A valid .agentNamespace entry required!" .Values.agentNamespace }}
3 changes: 3 additions & 0 deletions charts/cluster-manager-spoke/values.openapiv3_schema.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
properties:
agentNamespace:
type: string
bundleVersion:
properties:
operatorImageVersion:
Expand Down Expand Up @@ -65,5 +67,6 @@ properties:
type: object
type: array
required:
- agentNamespace
- clusterName
type: object
2 changes: 2 additions & 0 deletions charts/cluster-manager-spoke/values.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
clusterName: ""

agentNamespace: ""

hub:
apiServer: ""
kubeConfig: ""
Expand Down
8 changes: 0 additions & 8 deletions s.yaml

This file was deleted.

0 comments on commit 1a47b4d

Please sign in to comment.