From f1309281451c23027566bbb0c0f95834b2ed938a Mon Sep 17 00:00:00 2001 From: Thibault Jamet Date: Fri, 29 Nov 2024 21:04:23 +0100 Subject: [PATCH] fixup! Add fine-grain ingress DNS control through CRD --- ...a.com_clusteringressservicednsweights.yaml | 1 + .../traffic-controller/templates/rbac.yaml | 8 ++++++++ .../v1beta1/ingress_types.go | 19 ------------------- 3 files changed, 9 insertions(+), 19 deletions(-) create mode 120000 helm-chart/traffic-controller/crds/ingress.adevinta.com_clusteringressservicednsweights.yaml diff --git a/helm-chart/traffic-controller/crds/ingress.adevinta.com_clusteringressservicednsweights.yaml b/helm-chart/traffic-controller/crds/ingress.adevinta.com_clusteringressservicednsweights.yaml new file mode 120000 index 0000000..8a409a3 --- /dev/null +++ b/helm-chart/traffic-controller/crds/ingress.adevinta.com_clusteringressservicednsweights.yaml @@ -0,0 +1 @@ +../../../config/crd/bases/ingress.adevinta.com_clusteringressservicednsweights.yaml \ No newline at end of file diff --git a/helm-chart/traffic-controller/templates/rbac.yaml b/helm-chart/traffic-controller/templates/rbac.yaml index 99aa921..328bd76 100644 --- a/helm-chart/traffic-controller/templates/rbac.yaml +++ b/helm-chart/traffic-controller/templates/rbac.yaml @@ -5,6 +5,14 @@ metadata: namespace: {{ .Release.Namespace }} name: "{{ .Release.Name }}-leader-election-role" rules: +- apiGroups: + - ingress.adevinta.com + resources: + - "clusteringressservicednsweights" + verbs: + - get + - list + - watch - apiGroups: - "" resources: diff --git a/pkg/apis/ingress.adevinta.com/v1beta1/ingress_types.go b/pkg/apis/ingress.adevinta.com/v1beta1/ingress_types.go index b6ec3b2..fc78767 100644 --- a/pkg/apis/ingress.adevinta.com/v1beta1/ingress_types.go +++ b/pkg/apis/ingress.adevinta.com/v1beta1/ingress_types.go @@ -4,25 +4,6 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) -// kind: ClusterIngressServiceDNSWeight -// spec: -// weight: -// identifier: -// serviceSelector: -// -// namespace: -// matchLabels: -// : -// -// ingressSelector: -// -// matchLabels: -// : -// namespaces: -// - -// classes: -// - - // ClusterIngressServiceDNSWeight is the defines the links between k8s services and ingresses // +kubebuilder:object:root=true // +kubebuilder:resource:scope=Cluster