Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ spec:
matchLabels:
hypershift.openshift.io/hosted-control-plane: {{.HostedClusterNamespace}}
topologyKey: kubernetes.io/hostname
priorityClassName: hypershift-control-plane
priorityClassName: {{ .PriorityClass | default "hypershift-control-plane" }}
securityContext:
{{- if not (eq .RunAsUser "")}}
runAsUser: {{.RunAsUser}}
Expand Down
2 changes: 1 addition & 1 deletion bindata/network/node-identity/managed/node-identity.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ spec:
matchLabels:
hypershift.openshift.io/hosted-control-plane: {{.HostedClusterNamespace}}
topologyKey: kubernetes.io/hostname
priorityClassName: hypershift-api-critical
priorityClassName: {{ .PriorityClass | default "hypershift-api-critical" }}
initContainers:
- name: hosted-cluster-kubecfg-setup
image: "{{.CLIImage}}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ spec:
matchLabels:
hypershift.openshift.io/hosted-control-plane: {{.HostedClusterNamespace}}
topologyKey: kubernetes.io/hostname
priorityClassName: hypershift-api-critical
priorityClassName: {{ .PriorityClass | default "hypershift-api-critical" }}
initContainers:
# Remove once https://github.com/kubernetes/kubernetes/issues/85966 is addressed
- name: init-ip
Expand Down
1 change: 1 addition & 0 deletions pkg/bootstrap/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ type OVNHyperShiftBootstrapResult struct {
ControlPlaneImage string
CAConfigMap string
CAConfigMapKey string
PriorityClass string
}

type OVNConfigBoostrapResult struct {
Expand Down
1 change: 1 addition & 0 deletions pkg/network/cloud_network.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ func renderCloudNetworkConfigController(conf *operv1.NetworkSpec, bootstrapResul
data.Data["HCPLabels"] = cloudBootstrapResult.HostedControlPlane.Labels
data.Data["HCPTolerations"] = cloudBootstrapResult.HostedControlPlane.Tolerations
data.Data["RunAsUser"] = hcpCfg.RunAsUser
data.Data["PriorityClass"] = cloudBootstrapResult.HostedControlPlane.PriorityClass
// In HyperShift CloudNetworkConfigController is deployed as a part of the hosted cluster controlplane
// which means that it is created in the management cluster.
// CloudNetworkConfigController should use the proxy settings configured by hypershift controlplane operator
Expand Down
1 change: 1 addition & 0 deletions pkg/network/node_identity.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ func renderNetworkNodeIdentity(conf *operv1.NetworkSpec, bootstrapResult *bootst
data.Data["HCPNodeSelector"] = bootstrapResult.Infra.HostedControlPlane.NodeSelector
data.Data["HCPLabels"] = bootstrapResult.Infra.HostedControlPlane.Labels
data.Data["HCPTolerations"] = bootstrapResult.Infra.HostedControlPlane.Tolerations
data.Data["PriorityClass"] = bootstrapResult.Infra.HostedControlPlane.PriorityClass

data.Data["NetworkNodeIdentityImage"] = hcpCfg.ControlPlaneImage // OVN_CONTROL_PLANE_IMAGE
localAPIServer := bootstrapResult.Infra.APIServers[bootstrap.APIServerDefaultLocal]
Expand Down
8 changes: 5 additions & 3 deletions pkg/network/ovn_kubernetes.go
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,10 @@ func renderOVNKubernetes(conf *operv1.NetworkSpec, bootstrapResult *bootstrap.Bo
data.Data["HCPNodeSelector"] = bootstrapResult.OVN.OVNKubernetesConfig.HyperShiftConfig.HCPNodeSelector
data.Data["HCPLabels"] = bootstrapResult.OVN.OVNKubernetesConfig.HyperShiftConfig.HCPLabels
data.Data["HCPTolerations"] = bootstrapResult.OVN.OVNKubernetesConfig.HyperShiftConfig.HCPTolerations
data.Data["CAConfigMap"] = bootstrapResult.OVN.OVNKubernetesConfig.HyperShiftConfig.CAConfigMap
data.Data["CAConfigMapKey"] = bootstrapResult.OVN.OVNKubernetesConfig.HyperShiftConfig.CAConfigMapKey
data.Data["RunAsUser"] = bootstrapResult.OVN.OVNKubernetesConfig.HyperShiftConfig.RunAsUser
data.Data["PriorityClass"] = bootstrapResult.OVN.OVNKubernetesConfig.HyperShiftConfig.PriorityClass
data.Data["OVN_NB_INACTIVITY_PROBE"] = nb_inactivity_probe
data.Data["OVN_CERT_CN"] = OVN_CERT_CN
data.Data["OVN_NORTHD_PROBE_INTERVAL"] = os.Getenv("OVN_NORTHD_PROBE_INTERVAL")
Expand Down Expand Up @@ -418,9 +422,6 @@ func renderOVNKubernetes(conf *operv1.NetworkSpec, bootstrapResult *bootstrap.Bo
productFlavor := "self-hosted"
if bootstrapResult.OVN.OVNKubernetesConfig.HyperShiftConfig.Enabled {
productFlavor = "managed"
data.Data["CAConfigMap"] = bootstrapResult.OVN.OVNKubernetesConfig.HyperShiftConfig.CAConfigMap
data.Data["CAConfigMapKey"] = bootstrapResult.OVN.OVNKubernetesConfig.HyperShiftConfig.CAConfigMapKey
data.Data["RunAsUser"] = bootstrapResult.OVN.OVNKubernetesConfig.HyperShiftConfig.RunAsUser
}
manifestSubDir := filepath.Join(manifestDir, "network/ovn-kubernetes", productFlavor)
manifestDirs = append(manifestDirs, manifestSubDir)
Expand Down Expand Up @@ -734,6 +735,7 @@ func bootstrapOVNHyperShiftConfig(hc *hypershift.HyperShiftConfig, kubeClient cn
ovnHypershiftResult.HCPNodeSelector = hcp.NodeSelector
ovnHypershiftResult.HCPLabels = hcp.Labels
ovnHypershiftResult.HCPTolerations = hcp.Tolerations
ovnHypershiftResult.PriorityClass = hcp.PriorityClass

switch hcp.ControllerAvailabilityPolicy {
case hypershift.HighlyAvailable:
Expand Down