diff --git a/charts/apps/ingress/templates/reverse-proxy.yaml b/charts/apps/ingress/templates/reverse-proxy.yaml index f2223a5..a1401f5 100644 --- a/charts/apps/ingress/templates/reverse-proxy.yaml +++ b/charts/apps/ingress/templates/reverse-proxy.yaml @@ -1,15 +1,20 @@ {{ range $prefix, $data := .Values.reverseProxy }} --- -apiVersion: v1 -kind: Endpoints +apiVersion: discovery.k8s.io/v1 +kind: EndpointSlice metadata: name: "reverse-proxy-{{$prefix}}" -subsets: + labels: + kubernetes.io/service-name: "reverse-proxy-{{$prefix}}" +addressType: IPv4 +ports: +- port: {{ $data.port | default 80 }} + protocol: TCP +endpoints: - addresses: - - ip: "{{ $data.ip }}" - ports: - - port: {{ $data.port | default 80 }} - protocol: TCP + - "{{ $data.ip }}" + conditions: + ready: true --- apiVersion: v1 kind: Service @@ -54,4 +59,4 @@ spec: number: 80 {{ end }} -{{ end }} \ No newline at end of file +{{ end }} diff --git a/tf-modules.tf b/tf-modules.tf index 5b5b55e..87b8920 100644 --- a/tf-modules.tf +++ b/tf-modules.tf @@ -68,6 +68,28 @@ module "k8s-helm-charts" { configs = { cm = { "exec.enabled" : true + "resource.exclusions" : yamlencode([ + { apiGroups = [""], kinds = ["Endpoints"] }, + { apiGroups = ["coordination.k8s.io"], kinds = ["Lease"] }, + { + apiGroups = ["authentication.k8s.io", "authorization.k8s.io"] + kinds = [ + "SelfSubjectReview", "TokenReview", "LocalSubjectAccessReview", + "SelfSubjectAccessReview", "SelfSubjectRulesReview", "SubjectAccessReview", + ] + }, + { apiGroups = ["certificates.k8s.io"], kinds = ["CertificateSigningRequest"] }, + { apiGroups = ["cert-manager.io"], kinds = ["CertificateRequest"] }, + { apiGroups = ["cilium.io"], kinds = ["CiliumIdentity", "CiliumEndpoint", "CiliumEndpointSlice"] }, + { + apiGroups = ["kyverno.io", "reports.kyverno.io", "wgpolicyk8s.io"] + kinds = [ + "PolicyReport", "ClusterPolicyReport", "EphemeralReport", + "ClusterEphemeralReport", "AdmissionReport", "ClusterAdmissionReport", + "BackgroundScanReport", "ClusterBackgroundScanReport", "UpdateRequest", + ] + }, + ]) } params = { "server.insecure" = true