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

SDN-4832: Fixing ovn-k config parameters. Part 1 #2405

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: ovnkube-script-lib-control-plane
namespace: openshift-ovn-kubernetes
annotations:
kubernetes.io/description: |
This is a script used by the ovn-kubernetes daemonset
release.openshift.io/version: "{{.ReleaseVersion}}"
data:
ovnkube-lib.sh: |-
#!/bin/bash

start-ovnkube-control-plane()
{
local metrics_port=$1

ovn_v4_join_subnet_opt=
if [[ "{{.V4JoinSubnet}}" != "" ]]; then
ovn_v4_join_subnet_opt="--gateway-v4-join-subnet {{.V4JoinSubnet}}"
fi
ovn_v6_join_subnet_opt=
if [[ "{{.V6JoinSubnet}}" != "" ]]; then
ovn_v6_join_subnet_opt="--gateway-v6-join-subnet {{.V6JoinSubnet}}"
fi

ovn_v4_transit_switch_subnet_opt=
if [[ "{{.V4TransitSwitchSubnet}}" != "" ]]; then
ovn_v4_transit_switch_subnet_opt="--cluster-manager-v4-transit-switch-subnet {{.V4TransitSwitchSubnet}}"
fi
ovn_v6_transit_switch_subnet_opt=
if [[ "{{.V6TransitSwitchSubnet}}" != "" ]]; then
ovn_v6_transit_switch_subnet_opt="--cluster-manager-v6-transit-switch-subnet {{.V6TransitSwitchSubnet}}"
fi

admin_network_policy_enabled_flag=
if [[ "{{.OVN_ADMIN_NETWORK_POLICY_ENABLE}}" == "true" ]]; then
admin_network_policy_enabled_flag="--enable-admin-network-policy"
fi

dns_name_resolver_enabled_flag=
if [[ "{{.DNS_NAME_RESOLVER_ENABLE}}" == "true" ]]; then
dns_name_resolver_enabled_flag="--enable-dns-name-resolver"
fi

multi_network_enabled_flag=
if [[ "{{.OVN_MULTI_NETWORK_ENABLE}}" == "true" ]]; then
multi_network_enabled_flag="--enable-multi-network"
fi

echo "I$(date "+%m%d %H:%M:%S.%N") - ovnkube-control-plane - start ovnkube --init-cluster-manager ${K8S_NODE}"
exec /usr/bin/ovnkube \
--enable-interconnect \
--init-cluster-manager "${K8S_NODE}" \
--config-file=/run/ovnkube-config/ovnkube.conf \
--loglevel "${OVN_KUBE_LOG_LEVEL}" \
--metrics-bind-address "127.0.0.1:${metrics_port}" \
--metrics-enable-pprof \
--metrics-enable-config-duration \
${ovn_v4_join_subnet_opt} \
${ovn_v6_join_subnet_opt} \
${ovn_v4_transit_switch_subnet_opt} \
${ovn_v6_transit_switch_subnet_opt} \
${admin_network_policy_enabled_flag} \
${dns_name_resolver_enabled_flag} \
${multi_network_enabled_flag}
}
Original file line number Diff line number Diff line change
Expand Up @@ -620,5 +620,6 @@ data:
${ip_forwarding_flag} \
${NETWORK_NODE_IDENTITY_ENABLE} \
${ovn_v4_join_subnet_opt} \
${ovn_v6_join_subnet_opt}
${ovn_v6_join_subnet_opt} \
--encap-port "{{.GenevePort}}"
}
186 changes: 0 additions & 186 deletions bindata/network/ovn-kubernetes/managed/004-config.yaml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# The ovnconfig config file. Used by master processes in hypershift hostedcluster.
kind: ConfigMap
apiVersion: v1
metadata:
name: ovnkube-config
namespace: {{.HostedClusterNamespace}}
annotations:
network.operator.openshift.io/cluster-name: {{.ManagementClusterName}}
data:
ovnkube.conf: |-
[default]
mtu="{{.MTU}}"
{{- if .RoutableMTU }}
routable-mtu="{{.RoutableMTU}}"
{{- end }}
cluster-subnets="{{.OVN_cidr}}"
enable-lflow-cache=true
lflow-cache-limit-kb=1048576

[kubernetes]
service-cidrs="{{.OVN_service_cidr}}"
ovn-config-namespace="openshift-ovn-kubernetes"
cacert="/hosted-ca/ca.crt"
apiserver="{{.K8S_LOCAL_APISERVER}}"
host-network-namespace="openshift-host-network"
{{- if .OVNHybridOverlayEnable }}
no-hostsubnet-nodes="kubernetes.io/os=windows"
{{- end }}
platform-type="{{.PlatformType}}"
dns-service-namespace="openshift-dns"
dns-service-name="dns-default"

[ovnkubernetesfeature]
enable-egress-ip=true
enable-egress-firewall=true
enable-egress-qos=true
enable-egress-service=true
{{- if .ReachabilityTotalTimeoutSeconds }}
egressip-reachability-total-timeout={{.ReachabilityTotalTimeoutSeconds}}
{{- end }}
{{- if .ReachabilityNodePort }}
egressip-node-healthcheck-port={{.ReachabilityNodePort}}
{{- end }}
{{- if .OVN_MULTI_NETWORK_POLICY_ENABLE }}
enable-multi-networkpolicy=true
{{- end }}
{{- if .OVN_ADMIN_NETWORK_POLICY_ENABLE }}
enable-admin-network-policy=true
{{- end }}
enable-multi-external-gateway=true

[gateway]
mode={{.OVN_GATEWAY_MODE}}
nodeport=true
{{- if (index . "V4InternalMasqueradeSubnet")}}
v4-masquerade-subnet="{{.V4InternalMasqueradeSubnet}}"
{{- end }}
{{- if (index . "V6InternalMasqueradeSubnet")}}
v6-masquerade-subnet="{{.V6InternalMasqueradeSubnet}}"
{{- end }}


[logging]
libovsdblogfile=/var/log/ovnkube/libovsdb.log
logfile-maxsize=100
logfile-maxbackups=5
logfile-maxage=0

{{- if .OVNHybridOverlayEnable }}
[hybridoverlay]
enabled=true
{{- if .OVNHybridOverlayNetCIDR }}
cluster-subnets="{{.OVNHybridOverlayNetCIDR}}"
{{- end }}
{{- if .OVNHybridOverlayVXLANPort}}
hybrid-overlay-vxlan-port="{{.OVNHybridOverlayVXLANPort}}"
{{- end }}
{{- end }}
Loading