diff --git a/api/v1/remotenetwork_types.go b/api/v1/remotenetwork_types.go index 82df9f4..d113d23 100644 --- a/api/v1/remotenetwork_types.go +++ b/api/v1/remotenetwork_types.go @@ -118,6 +118,11 @@ type NetworkConfig struct { // MTU is the MTU to use for the interface. It will be automatically // chosen if not provided. MTU int `json:"mtu,omitempty"` + // LocalDomain is the domain to forward DNS requests for from the remote + // network. Requests to this domain will have their question mutated and + // passed to the cluster DNS. If not provided, the local domain will be + // the cluster domain. + LocalDomain string `json:"localDomain,omitempty"` // DisableIPv4 disables IPv4 forwarding on the interface. DisableIPv4 bool `json:"disableIPv4,omitempty"` // DisableIPv6 disables IPv6 forwarding on the interface. diff --git a/deploy/bundle.yaml b/deploy/bundle.yaml index 69f4d63..a69a8bd 100644 --- a/deploy/bundle.yaml +++ b/deploy/bundle.yaml @@ -981,6 +981,12 @@ spec: It will be automatically chosen from the name of the remote network if not provided. type: string + localDomain: + description: LocalDomain is the domain to forward DNS requests + for from the remote network. Requests to this domain will have + their question mutated and passed to the cluster DNS. If not + provided, the local domain will be the cluster domain. + type: string mtu: description: MTU is the MTU to use for the interface. It will be automatically chosen if not provided. @@ -1212,8 +1218,8 @@ rules: --- # Source: deploy/config/configmap.yaml # This ConfigMap is used to configure the webmesh-cni installation. -kind: ConfigMap apiVersion: v1 +kind: ConfigMap metadata: name: webmesh-config namespace: kube-system @@ -1256,8 +1262,8 @@ data: # and configuration on each node in the cluster. It also runs the # webmesh-cni-node binary as a privileged container to manage the # network interfaces on each node. -kind: DaemonSet apiVersion: apps/v1 +kind: DaemonSet metadata: name: webmesh-node namespace: kube-system diff --git a/deploy/cni/cni.yaml b/deploy/cni/cni.yaml index 7514c5e..2bb6afb 100644 --- a/deploy/cni/cni.yaml +++ b/deploy/cni/cni.yaml @@ -3,8 +3,8 @@ # and configuration on each node in the cluster. It also runs the # webmesh-cni-node binary as a privileged container to manage the # network interfaces on each node. -kind: DaemonSet apiVersion: apps/v1 +kind: DaemonSet metadata: name: webmesh-node namespace: kube-system diff --git a/deploy/config/configmap.yaml b/deploy/config/configmap.yaml index 026ce22..9ce778f 100644 --- a/deploy/config/configmap.yaml +++ b/deploy/config/configmap.yaml @@ -1,7 +1,7 @@ --- # This ConfigMap is used to configure the webmesh-cni installation. -kind: ConfigMap apiVersion: v1 +kind: ConfigMap metadata: name: webmesh-config namespace: kube-system diff --git a/deploy/crds/cni.webmesh.io_remotenetworks.yaml b/deploy/crds/cni.webmesh.io_remotenetworks.yaml index a1a6574..52f8863 100644 --- a/deploy/crds/cni.webmesh.io_remotenetworks.yaml +++ b/deploy/crds/cni.webmesh.io_remotenetworks.yaml @@ -110,6 +110,12 @@ spec: It will be automatically chosen from the name of the remote network if not provided. type: string + localDomain: + description: LocalDomain is the domain to forward DNS requests + for from the remote network. Requests to this domain will have + their question mutated and passed to the cluster DNS. If not + provided, the local domain will be the cluster domain. + type: string mtu: description: MTU is the MTU to use for the interface. It will be automatically chosen if not provided. diff --git a/examples/multi-cluster/deploy-one/kustomization.yaml b/examples/multi-cluster/deploy-one/kustomization.yaml new file mode 100644 index 0000000..2816251 --- /dev/null +++ b/examples/multi-cluster/deploy-one/kustomization.yaml @@ -0,0 +1,20 @@ +--- +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +namespace: kube-system +resources: +- ../../../deploy +labels: +- includeSelectors: true + pairs: + k8s-app: webmesh-cni +patches: +- patch: | + apiVersion: v1 + kind: ConfigMap + metadata: + name: webmesh-config + namespace: kube-system + data: + pod-cidr: "10.42.0.0/16,fd00:10:42::/48" + service-cidr: "10.96.0.0/12,fd00:10:96::/112" diff --git a/examples/multi-cluster/deploy-two/kustomization.yaml b/examples/multi-cluster/deploy-two/kustomization.yaml new file mode 100644 index 0000000..f8845bc --- /dev/null +++ b/examples/multi-cluster/deploy-two/kustomization.yaml @@ -0,0 +1,20 @@ +--- +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +namespace: kube-system +resources: +- ../../../deploy +labels: +- includeSelectors: true + pairs: + k8s-app: webmesh-cni +patches: +- patch: | + apiVersion: v1 + kind: ConfigMap + metadata: + name: webmesh-config + namespace: kube-system + data: + pod-cidr: "10.43.0.0/16,fd00:10:43::/48" + service-cidr: "10.97.0.0/12,fd00:10:97::/112"