Skip to content
Snippets Groups Projects
Commit a6bfccf9 authored by Jack Charlie Munday's avatar Jack Charlie Munday
Browse files

test: migrate to cilium based policy

parent 47a981f9
No related branches found
No related tags found
1 merge request!194deploy: migrate to redis sentinel for gpn registries
Pipeline #10952973 passed
Pipeline: kops-registry

#10952978

    {{- if .Values.redis.enabled }}
    ---
    apiVersion: cilium.io/v2
    kind: CiliumNetworkPolicy
    metadata:
    name: {{ include "kops-registry.name" . }}-redis
    labels:
    {{- include "kops-registry.labels" . | nindent 4 }}
    spec:
    endpointSelector:
    matchLabels:
    app.kubernetes.io/instance: redis
    app.kubernetes.io/name: redis
    ingress:
    - fromEndpoints:
    - matchLabels:
    redis-client: "true"
    - matchLabels:
    app.kubernetes.io/instance: redis
    app.kubernetes.io/name: redis
    - matchLabels:
    app.kubernetes.io/component: core
    app.kubernetes.io/name: harbor
    - matchLabels:
    reserved: host
    toPorts:
    - ports:
    - port: "6379"
    protocol: TCP
    - ports:
    - port: "26379"
    protocol: TCP
    - fromEndpoints:
    - matchLabels:
    reserved: all
    toPorts:
    - ports:
    - port: "9121"
    protocol: TCP
    egress:
    - toEndpoints:
    - matchLabels:
    app.kubernetes.io/instance: redis
    app.kubernetes.io/name: redis
    toPorts:
    - ports:
    - port: "6379"
    protocol: TCP
    - port: "26379"
    protocol: TCP
    - toEndpoints:
    - matchLabels:
    app.kubernetes.io/instance: redis
    app.kubernetes.io/name: redis
    toPorts:
    - ports:
    - port: "53"
    protocol: UDP
    {{- end }}
    ......@@ -271,25 +271,7 @@ redis:
    enabled: false
    sentinel: false
    networkPolicy:
    enabled: true
    allowExternal: false
    allowExternalEgress: false
    extraIngress:
    - ports:
    - port: 6379
    from:
    - podSelector:
    - matchLabels:
    app.kubernetes.io/component: core
    app.kubernetes.io/name: harbor
    - port: 26379
    from:
    - podSelector:
    - matchLabels:
    app.kubernetes.io/component: core
    app.kubernetes.io/name: harbor
    metrics:
    allowExternal: true
    enabled: false # see ./templates/netpol-redis.yaml for cilium based policy.
    persistence:
    enabled: false
    master:
    ......
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Finish editing this message first!
    Please register or to comment