diff --git "a/yaml_data.json" "b/yaml_data.json" deleted file mode 100644--- "a/yaml_data.json" +++ /dev/null @@ -1,6635 +0,0 @@ -[ - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "Cilium", - "file_name": "tests-smoke.yaml" - }, - "content": { - "name": "Smoke Test", - "true": { - "pull_request": {}, - "push": { - "branches": [ - "main", - "ft/main/**" - ] - }, - "merge_group": { - "types": [ - "checks_requested" - ] - } - }, - "permissions": "read-all", - "concurrency": { - "group": "${{ github.workflow }}-${{ github.event.pull_request.number || github.event.after || github.event.merge_group && github.run_id }}", - "cancel-in-progress": "${{ !github.event.merge_group }}" - }, - "env": { - "cilium_cli_ci_version": null, - "KIND_CONFIG": ".github/kind-config.yaml", - "CONFORMANCE_TEMPLATE": "examples/kubernetes/connectivity-check/connectivity-check.yaml", - "TIMEOUT": "2m", - "LOG_TIME": "30m", - "PROM_VERSION": "2.34.0" - }, - "jobs": { - "check_changes": { - "name": "Deduce required tests from code changes", - "runs-on": "ubuntu-22.04", - "outputs": { - "tested": "${{ steps.tested-tree.outputs.src }}" - }, - "steps": [ - { - "name": "Checkout code", - "if": "${{ !github.event.pull_request }}", - "uses": "actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b", - "with": { - "persist-credentials": false, - "fetch-depth": 0 - } - }, - { - "name": "Check code changes", - "uses": "dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36", - "id": "tested-tree", - "with": { - "base": "${{ github.ref }}", - "filters": "src:\n - '!(test|Documentation)/**'\n" - } - } - ] - }, - "preflight-clusterrole": { - "runs-on": "ubuntu-latest", - "name": "Preflight Clusterrole Check", - "steps": [ - { - "name": "Checkout code", - "uses": "actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b", - "with": { - "persist-credentials": false - } - }, - { - "name": "Check pre-flight clusterrole", - "run": "make check-k8s-clusterrole" - } - ] - }, - "helm-charts": { - "runs-on": "ubuntu-latest", - "name": "Helm Charts Check", - "steps": [ - { - "name": "Checkout", - "uses": "actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b", - "with": { - "persist-credentials": false - } - }, - { - "name": "Run helm-charts", - "run": "make -C install/kubernetes\ntest -z \"$(git status --porcelain)\" || (echo \"please run 'make -C install/kubernetes' and submit your changes\"; exit 1)\n" - } - ] - }, - "conformance-test": { - "needs": "check_changes", - "if": "${{ needs.check_changes.outputs.tested == 'true' && github.event_name != 'merge_group' }}", - "runs-on": "ubuntu-latest", - "name": "Installation and Conformance Test", - "steps": [ - { - "name": "Collect Workflow Telemetry", - "uses": "catchpoint/workflow-telemetry-action@94c3c3d9567a0205de6da68a76c428ce4e769af1", - "with": { - "comment_on_pr": false - } - }, - { - "name": "Checkout target branch to access local actions", - "uses": "actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b", - "with": { - "ref": "${{ github.base_ref || github.ref }}", - "persist-credentials": false - } - }, - { - "name": "Set Environment Variables", - "uses": "./.github/actions/set-env-variables" - }, - { - "name": "Checkout", - "uses": "actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b", - "with": { - "persist-credentials": false - } - }, - { - "name": "Get Cilium's default values", - "id": "default_vars", - "uses": "./.github/actions/helm-default", - "with": { - "image-tag": "${{ github.event.pull_request.head.sha }}" - } - }, - { - "name": "Set image tag", - "id": "sha", - "run": "echo sha=${{ steps.default_vars.outputs.sha }} >> $GITHUB_OUTPUT\n" - }, - { - "name": "Precheck generated connectivity manifest files", - "run": "make -C examples/kubernetes/connectivity-check fmt\nmake -C examples/kubernetes/connectivity-check all\ntest -z \"$(git status --porcelain)\" || (echo \"please run 'make -C examples/kubernetes/connectivity-check fmt all' and submit your changes\"; exit 1)\n" - }, - { - "name": "Create kind cluster", - "uses": "helm/kind-action@0025e74a8c7512023d06dc019c617aa3cf561fde", - "with": { - "version": "${{ env.KIND_VERSION }}", - "node_image": "${{ env.KIND_K8S_IMAGE }}", - "kubectl_version": "${{ env.KIND_K8S_VERSION }}", - "config": "${{ env.KIND_CONFIG }}", - "wait": 0 - } - }, - { - "name": "Wait for images to be available", - "timeout-minutes": 30, - "shell": "bash", - "run": "for image in cilium-ci operator-generic-ci hubble-relay-ci ; do\n until docker manifest inspect quay.io/${{ env.QUAY_ORGANIZATION_DEV }}/$image:${{ steps.sha.outputs.sha }} &> /dev/null; do sleep 45s; done\ndone\n" - }, - { - "name": "Set up install variables", - "id": "vars", - "run": "CILIUM_INSTALL_DEFAULTS=\"${{ steps.default_vars.outputs.cilium_install_defaults }} \\\n --helm-set nodeinit.enabled=true \\\n --helm-set kubeProxyReplacement=true \\\n --helm-set ipam.mode=kubernetes \\\n --helm-set hubble.relay.enabled=true \\\n --helm-set prometheus.enabled=true \\\n --helm-set operator.prometheus.enabled=true \\\n --helm-set hubble.enabled=true \\\n --helm-set=hubble.metrics.enabled=\\\"{dns,drop,tcp,flow,port-distribution,icmp,http}\\\" \\\n --helm-set ingressController.enabled=true\"\n\necho cilium_install_defaults=${CILIUM_INSTALL_DEFAULTS} >> $GITHUB_OUTPUT\n" - }, - { - "name": "Install Cilium CLI", - "uses": "cilium/cilium-cli@bfa4f93a41da410a1b4c9373c1694ca6d5c35ade", - "with": { - "repository": "${{ env.CILIUM_CLI_RELEASE_REPO }}", - "release-version": "${{ env.CILIUM_CLI_VERSION }}", - "ci-version": "${{ env.cilium_cli_ci_version }}" - } - }, - { - "name": "Install Cilium", - "id": "install-cilium", - "run": "cilium install ${{ steps.vars.outputs.cilium_install_defaults }}\n" - }, - { - "name": "Wait for Cilium status to be ready", - "run": "cilium status --wait\nkubectl -n kube-system get pods\n" - }, - { - "name": "Port forward Relay", - "run": "cilium hubble port-forward&\nsleep 10s\n[[ $(pgrep -f \"cilium.*hubble.*port-forward|kubectl.*port-forward.*hubble-relay\" | wc -l) == 2 ]]\n" - }, - { - "name": "Run conformance test (e.g. connectivity check)", - "run": "kubectl apply -f ${{ env.CONFORMANCE_TEMPLATE }}\nkubectl wait --for=condition=Available --all deployment --timeout=${{ env.TIMEOUT }}\n" - }, - { - "name": "Check prometheus metrics", - "if": "${{ success() }}", - "run": "cd $HOME\ncilium_pod=$(kubectl -n kube-system get po -o name --field-selector=status.phase==Running -l 'k8s-app=cilium' -o jsonpath='{.items[0].metadata.name}' )\nkubectl -n kube-system exec $cilium_pod -- sh -c \"apt update && apt install curl -y\"\nkubectl -n kube-system exec $cilium_pod -- curl http://localhost:9962/metrics > metrics.prom\n# Install promtool binary release. `go install` doesn't work due to\n# https://github.com/prometheus/prometheus/issues/8852 and related issues.\ncurl -sSL --remote-name-all https://github.com/prometheus/prometheus/releases/download/v${PROM_VERSION}/{prometheus-${PROM_VERSION}.linux-amd64.tar.gz,sha256sums.txt}\nsha256sum --check --ignore-missing sha256sums.txt\ntar xzvf prometheus-${PROM_VERSION}.linux-amd64.tar.gz prometheus-${PROM_VERSION}.linux-amd64/promtool\nrm -f prometheus-${PROM_VERSION}.linux-amd64.tar.gz\nsudo mv prometheus-${PROM_VERSION}.linux-amd64/promtool /usr/bin\ncat metrics.prom | promtool check metrics\n" - }, - { - "name": "Report cluster failure status and capture cilium-sysdump", - "if": "${{ failure() && steps.install-cilium.outcome != 'skipped' }}", - "shell": "script -q -e -c \"bash --noprofile --norc -eo pipefail {0}\"", - "run": "echo \"=== Retrieve cluster state ===\"\nkubectl get pods --all-namespaces -o wide\ncilium status\ncilium sysdump --output-filename cilium-sysdump-out\n" - }, - { - "name": "Upload cilium-sysdump", - "uses": "actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808", - "if": "${{ failure() }}", - "with": { - "name": "cilium-sysdump-out.zip", - "path": "cilium-sysdump-out.zip" - } - } - ] - } - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "Cilium", - "file_name": "tls-ingress.yaml" - }, - "content": { - "apiVersion": "networking.k8s.io/v1", - "kind": "Ingress", - "metadata": { - "name": "tls-ingress", - "namespace": "default" - }, - "spec": { - "ingressClassName": "cilium", - "rules": [ - { - "host": "hipstershop.cilium.rocks", - "http": { - "paths": [ - { - "backend": { - "service": { - "name": "productcatalogservice", - "port": { - "number": 3550 - } - } - }, - "path": "/hipstershop.ProductCatalogService", - "pathType": "Prefix" - }, - { - "backend": { - "service": { - "name": "currencyservice", - "port": { - "number": 7000 - } - } - }, - "path": "/hipstershop.CurrencyService", - "pathType": "Prefix" - } - ] - } - }, - { - "host": "bookinfo.cilium.rocks", - "http": { - "paths": [ - { - "backend": { - "service": { - "name": "details", - "port": { - "number": 9080 - } - } - }, - "path": "/details", - "pathType": "Prefix" - }, - { - "backend": { - "service": { - "name": "productpage", - "port": { - "number": 9080 - } - } - }, - "path": "/", - "pathType": "Prefix" - } - ] - } - } - ], - "tls": [ - { - "hosts": [ - "bookinfo.cilium.rocks", - "hipstershop.cilium.rocks" - ], - "secretName": "demo-cert" - } - ] - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "Cilium", - "file_name": "tls-migration.yaml" - }, - "content": { - "apiVersion": "gateway.networking.k8s.io/v1", - "kind": "Gateway", - "metadata": { - "name": "cilium-gateway", - "namespace": "default" - }, - "spec": { - "gatewayClassName": "cilium", - "listeners": [ - { - "hostname": "hipstershop.cilium.rocks", - "name": "hipstershop-cilium-rocks-http", - "port": 80, - "protocol": "HTTP" - }, - { - "hostname": "hipstershop.cilium.rocks", - "name": "hipstershop-cilium-rocks-https", - "port": 443, - "protocol": "HTTPS", - "tls": { - "certificateRefs": [ - { - "kind": "Secret", - "name": "demo-cert" - } - ] - } - }, - { - "hostname": "bookinfo.cilium.rocks", - "name": "bookinfo-cilium-rocks-http", - "port": 80, - "protocol": "HTTP" - }, - { - "hostname": "bookinfo.cilium.rocks", - "name": "bookinfo-cilium-rocks-https", - "port": 443, - "protocol": "HTTPS", - "tls": { - "certificateRefs": [ - { - "kind": "Secret", - "name": "demo-cert" - } - ] - } - } - ] - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "Cilium", - "file_name": "tls-migration.yaml" - }, - "content": { - "apiVersion": "gateway.networking.k8s.io/v1", - "kind": "HTTPRoute", - "metadata": { - "name": "hipstershop-cilium-rocks", - "namespace": "default" - }, - "spec": { - "hostnames": [ - "hipstershop.cilium.rocks" - ], - "parentRefs": [ - { - "name": "cilium-gateway" - } - ], - "rules": [ - { - "matches": [ - { - "path": { - "type": "PathPrefix", - "value": "/hipstershop.ProductCatalogService" - } - } - ], - "backendRefs": [ - { - "name": "productcatalogservice", - "port": 3550 - } - ] - }, - { - "matches": [ - { - "path": { - "type": "PathPrefix", - "value": "/hipstershop.CurrencyService" - } - } - ], - "backendRefs": [ - { - "name": "currencyservice", - "port": 7000 - } - ] - } - ] - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "Cilium", - "file_name": "tls-migration.yaml" - }, - "content": { - "apiVersion": "gateway.networking.k8s.io/v1", - "kind": "HTTPRoute", - "metadata": { - "name": "bookinfo-cilium-rocks", - "namespace": "default" - }, - "spec": { - "hostnames": [ - "bookinfo.cilium.rocks" - ], - "parentRefs": [ - { - "name": "cilium-gateway" - } - ], - "rules": [ - { - "matches": [ - { - "path": { - "type": "PathPrefix", - "value": "/details" - } - } - ], - "backendRefs": [ - { - "name": "details", - "port": 9080 - } - ] - }, - { - "matches": [ - { - "path": { - "type": "PathPrefix", - "value": "/" - } - } - ], - "backendRefs": [ - { - "name": "productpage", - "port": 9080 - } - ] - } - ] - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "Cilium", - "file_name": "tlsroute-invalid-reference-grant.yaml" - }, - "content": { - "apiVersion": "gateway.networking.k8s.io/v1beta1", - "kind": "ReferenceGrant", - "metadata": { - "name": "reference-grant-wrong-namespace", - "namespace": "gateway-conformance-infra" - }, - "spec": { - "from": [ - { - "group": "gateway.networking.k8s.io", - "kind": "TLSRoute", - "namespace": "gateway-conformance-infra" - } - ], - "to": [ - { - "group": "", - "kind": "Service", - "name": "tls-backend" - } - ] - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "Cilium", - "file_name": "tlsroute-invalid-reference-grant.yaml" - }, - "content": { - "apiVersion": "gateway.networking.k8s.io/v1beta1", - "kind": "ReferenceGrant", - "metadata": { - "name": "reference-grant-wrong-from-group", - "namespace": "gateway-conformance-app-backend" - }, - "spec": { - "from": [ - { - "group": "not-the-group-youre-looking-for", - "kind": "TLSRoute", - "namespace": "gateway-conformance-infra" - } - ], - "to": [ - { - "group": "", - "kind": "Service", - "name": "tls-backend" - } - ] - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "Cilium", - "file_name": "tlsroute-invalid-reference-grant.yaml" - }, - "content": { - "apiVersion": "gateway.networking.k8s.io/v1beta1", - "kind": "ReferenceGrant", - "metadata": { - "name": "reference-grant-wrong-from-kind", - "namespace": "gateway-conformance-app-backend" - }, - "spec": { - "from": [ - { - "group": "gateway.networking.k8s.io", - "kind": "Gateway", - "namespace": "gateway-conformance-infra" - } - ], - "to": [ - { - "group": "", - "kind": "Service", - "name": "tls-backend" - } - ] - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "Cilium", - "file_name": "tlsroute-invalid-reference-grant.yaml" - }, - "content": { - "apiVersion": "gateway.networking.k8s.io/v1beta1", - "kind": "ReferenceGrant", - "metadata": { - "name": "reference-grant-wrong-from-namespace", - "namespace": "gateway-conformance-app-backend" - }, - "spec": { - "from": [ - { - "group": "gateway.networking.k8s.io", - "kind": "TLSRoute", - "namespace": "not-the-namespace-youre-looking-for" - } - ], - "to": [ - { - "group": "", - "kind": "Service", - "name": "tls-backend" - } - ] - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "Cilium", - "file_name": "tlsroute-invalid-reference-grant.yaml" - }, - "content": { - "apiVersion": "gateway.networking.k8s.io/v1beta1", - "kind": "ReferenceGrant", - "metadata": { - "name": "reference-grant-wrong-to-group", - "namespace": "gateway-conformance-app-backend" - }, - "spec": { - "from": [ - { - "group": "gateway.networking.k8s.io", - "kind": "TLSRoute", - "namespace": "gateway-conformance-infra" - } - ], - "to": [ - { - "group": "not-the-group-youre-looking-for", - "kind": "Service", - "name": "tls-backend" - } - ] - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "Cilium", - "file_name": "tlsroute-invalid-reference-grant.yaml" - }, - "content": { - "apiVersion": "gateway.networking.k8s.io/v1beta1", - "kind": "ReferenceGrant", - "metadata": { - "name": "reference-grant-wrong-to-kind", - "namespace": "gateway-conformance-app-backend" - }, - "spec": { - "from": [ - { - "group": "gateway.networking.k8s.io", - "kind": "TLSRoute", - "namespace": "gateway-conformance-infra" - } - ], - "to": [ - { - "group": "", - "kind": "Secret", - "name": "tls-backend" - } - ] - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "Cilium", - "file_name": "tlsroute-invalid-reference-grant.yaml" - }, - "content": { - "apiVersion": "gateway.networking.k8s.io/v1beta1", - "kind": "ReferenceGrant", - "metadata": { - "name": "reference-grant-wrong-to-name", - "namespace": "gateway-conformance-app-backend" - }, - "spec": { - "from": [ - { - "group": "gateway.networking.k8s.io", - "kind": "TLSRoute", - "namespace": "gateway-conformance-infra" - } - ], - "to": [ - { - "group": "", - "kind": "Service", - "name": "not-the-service-youre-looking-for" - } - ] - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "Cilium", - "file_name": "tlsroute-invalid-reference-grant.yaml" - }, - "content": { - "apiVersion": "gateway.networking.k8s.io/v1alpha2", - "kind": "TLSRoute", - "metadata": { - "name": "gateway-conformance-infra-test", - "namespace": "gateway-conformance-infra" - }, - "spec": { - "parentRefs": [ - { - "name": "gateway-tlsroute-referencegrant" - } - ], - "hostnames": [ - "abc.example.com" - ], - "rules": [ - { - "backendRefs": [ - { - "name": "tls-backend", - "namespace": "gateway-conformance-app-backend", - "port": 443 - } - ] - } - ] - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "Cilium", - "file_name": "tlsroute-invalid-reference-grant.yaml" - }, - "content": { - "apiVersion": "gateway.networking.k8s.io/v1beta1", - "kind": "Gateway", - "metadata": { - "name": "gateway-tlsroute-referencegrant", - "namespace": "gateway-conformance-infra" - }, - "spec": { - "gatewayClassName": "{GATEWAY_CLASS_NAME}", - "listeners": [ - { - "name": "https", - "port": 443, - "protocol": "TLS", - "hostname": "*.example.com", - "allowedRoutes": { - "namespaces": { - "from": "Same" - }, - "kinds": [ - { - "kind": "TLSRoute" - } - ] - }, - "tls": { - "mode": "Passthrough" - } - } - ] - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "Cilium", - "file_name": "tlsroute-simple-same-namespace.yaml" - }, - "content": { - "apiVersion": "gateway.networking.k8s.io/v1alpha2", - "kind": "TLSRoute", - "metadata": { - "name": "gateway-conformance-infra-test", - "namespace": "gateway-conformance-infra" - }, - "spec": { - "parentRefs": [ - { - "name": "gateway-tlsroute", - "namespace": "gateway-conformance-infra" - } - ], - "hostnames": [ - "abc.example.com" - ], - "rules": [ - { - "backendRefs": [ - { - "name": "tls-backend", - "port": 443 - } - ] - } - ] - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "Cilium", - "file_name": "tlsroute-simple-same-namespace.yaml" - }, - "content": { - "apiVersion": "gateway.networking.k8s.io/v1beta1", - "kind": "Gateway", - "metadata": { - "name": "gateway-tlsroute", - "namespace": "gateway-conformance-infra" - }, - "spec": { - "gatewayClassName": "{GATEWAY_CLASS_NAME}", - "listeners": [ - { - "name": "https", - "port": 443, - "protocol": "TLS", - "hostname": "*.example.com", - "allowedRoutes": { - "namespaces": { - "from": "Same" - }, - "kinds": [ - { - "kind": "TLSRoute" - } - ] - }, - "tls": { - "mode": "Passthrough" - } - } - ] - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "Cilium", - "file_name": "topo.yaml" - }, - "content": { - "name": "bgp-cplane-dev-v6", - "topology": { - "nodes": { - "router0": { - "kind": "linux", - "image": "frrouting/frr:v8.4.0", - "cmd": "bash", - "exec": [ - "sysctl net.ipv6.conf.all.forwarding=1", - "ip addr add fd00:10:0:1::1/64 dev net0", - "ip addr add fd00:10:0:2::1/64 dev net1", - "ip addr add fd00:10:0:3::1/64 dev net2", - "ip route add blackhole fd00::/16", - "touch /etc/frr/vtysh.conf", - "touch /var/log/frr.log", - "chown frr:frr /var/log/frr.log", - "sed -i -e 's/bgpd=no/bgpd=yes/g' /etc/frr/daemons", - "/usr/lib/frr/frrinit.sh start", - "vtysh -c 'conf t' -c 'log file /var/log/frr.log' -c 'debug bgp neighbor-events' -c 'debug bgp updates' -c 'debug bgp zebra' -c 'router bgp 65000' -c ' bgp bestpath as-path multipath-relax' -c ' no bgp ebgp-requires-policy' -c ' no bgp default ipv4-unicast' -c ' bgp default ipv6-unicast' -c ' bgp router-id 10.0.0.1' -c ' neighbor CILIUM peer-group' -c ' neighbor CILIUM remote-as external' -c ' neighbor fd00:10:0:1::2 peer-group CILIUM' -c ' neighbor fd00:10:0:2::2 peer-group CILIUM' -c '!'" - ] - }, - "server0": { - "kind": "linux", - "image": "nicolaka/netshoot:v0.11", - "network-mode": "container:bgp-cplane-dev-v6-control-plane", - "exec": [ - "ip addr add fd00:10:0:1::2/64 dev net0", - "ip route add fd00::/16 via fd00:10:0:1::1 dev net0" - ] - }, - "server1": { - "kind": "linux", - "image": "nicolaka/netshoot:v0.11", - "network-mode": "container:bgp-cplane-dev-v6-worker", - "exec": [ - "ip addr add fd00:10:0:2::2/64 dev net0", - "ip route add fd00::/16 via fd00:10:0:2::1 dev net0" - ] - }, - "server2": { - "kind": "linux", - "image": "nicolaka/netshoot:v0.11", - "exec": [ - "ip addr add fd00:10:0:3::2/64 dev net0", - "ip route add fd00::/16 via fd00:10:0:3::1 dev net0" - ] - } - }, - "links": [ - { - "endpoints": [ - "router0:net0", - "server0:net0" - ] - }, - { - "endpoints": [ - "router0:net1", - "server1:net0" - ] - }, - { - "endpoints": [ - "router0:net2", - "server2:net0" - ] - } - ] - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "Cilium", - "file_name": "udproute-simple.yaml" - }, - "content": { - "apiVersion": "gateway.networking.k8s.io/v1beta1", - "kind": "Gateway", - "metadata": { - "name": "udp-gateway", - "namespace": "gateway-conformance-infra" - }, - "spec": { - "gatewayClassName": "{GATEWAY_CLASS_NAME}", - "listeners": [ - { - "name": "coredns", - "protocol": "UDP", - "port": 5300, - "allowedRoutes": { - "kinds": [ - { - "kind": "UDPRoute" - } - ] - } - } - ] - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "Cilium", - "file_name": "udproute-simple.yaml" - }, - "content": { - "apiVersion": "gateway.networking.k8s.io/v1alpha2", - "kind": "UDPRoute", - "metadata": { - "name": "udp-coredns", - "namespace": "gateway-conformance-infra" - }, - "spec": { - "parentRefs": [ - { - "name": "udp-gateway", - "sectionName": "coredns" - } - ], - "rules": [ - { - "backendRefs": [ - { - "name": "coredns", - "port": 53 - } - ] - } - ] - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "Cilium", - "file_name": "update-label-backport-pr.yaml" - }, - "content": { - "name": "Update labels of backported PRs", - "true": { - "workflow_call": { - "inputs": { - "pr-body": { - "required": true, - "type": "string", - "description": "The PR description containing all the references to the backported PRs." - }, - "branch": { - "required": true, - "type": "string", - "description": "The stable branch version." - } - } - } - }, - "jobs": { - "backport-label-updater": { - "name": "Update labels of backported PRs", - "runs-on": "ubuntu-latest", - "permissions": { - "pull-requests": "write" - }, - "env": { - "body": "${{ inputs.pr-body }}" - }, - "steps": [ - { - "name": "Pre-process PR body", - "id": "pre-process", - "uses": "actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea", - "with": { - "script": "const { body } = process.env\nreturn body.replace(/\\'/g, '')\n .replace(/\"/g, '')\n .replace(/`/g, '')\n .replace(/$/g, '')\n", - "result-encoding": "string" - } - }, - { - "name": "Update labels", - "env": { - "GITHUB_TOKEN": "${{ secrets.GITHUB_TOKEN }}" - }, - "run": "echo \"${{steps.pre-process.outputs.result}}\" | sed -En \"/upstream-prs/ { n; p }\" | cut -d ';' -f 1 | grep -Eo '[0-9]+' | while read -r pr; do\n echo \"Removing label backport-pending/${{ inputs.branch }} from pr #${pr}.\"\n gh pr edit ${pr} --repo \"${GITHUB_REPOSITORY}\" --remove-label backport-pending/${{ inputs.branch }}\n echo \"Adding label backport-done/${{ inputs.branch }} to pr #${pr}.\"\n gh pr edit ${pr} --repo \"${GITHUB_REPOSITORY}\" --add-label backport-done/${{ inputs.branch }}\ndone\n" - } - ] - } - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "Cilium", - "file_name": "valid-flowlogs-config.yaml" - }, - "content": { - "flowLogs": [ - { - "name": "test001", - "filePath": "/var/log/network/flow-log/pa/test001.log", - "fieldMask": [], - "includeFilters": [], - "excludeFilters": [], - "end": "2023-10-09T23:59:59-07:00" - }, - { - "name": "test002", - "filePath": "/var/log/network/flow-log/pa/test002.log", - "fieldMask": [ - "source.namespace", - "source.pod_name", - "destination.namespace", - "destination.pod_name", - "verdict" - ], - "includeFilters": [ - { - "source_pod": [ - "default/" - ], - "event_type": [ - { - "type": 1 - } - ] - }, - { - "destination_pod": [ - "frontend/nginx-975996d4c-7hhgt" - ] - } - ], - "excludeFilters": [], - "end": "2023-10-09T23:59:59-07:00" - }, - { - "name": "test003", - "filePath": "/var/log/network/flow-log/pa/test003.log", - "fieldMask": [ - "source", - "destination", - "verdict" - ], - "includeFilters": [], - "excludeFilters": [ - { - "destination_pod": [ - "ingress/" - ] - } - ] - } - ] - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "Cilium", - "file_name": "values.yaml" - }, - "content": { - "IP": "0.0.0.0" - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "Cilium", - "file_name": "versions.yaml" - }, - "content": { - "module-sets": { - "stable-v1": { - "version": "v1.26.0", - "modules": [ - "go.opentelemetry.io/otel", - "go.opentelemetry.io/otel/bridge/opencensus", - "go.opentelemetry.io/otel/bridge/opencensus/test", - "go.opentelemetry.io/otel/bridge/opentracing", - "go.opentelemetry.io/otel/bridge/opentracing/test", - "go.opentelemetry.io/otel/example/dice", - "go.opentelemetry.io/otel/example/namedtracer", - "go.opentelemetry.io/otel/example/opencensus", - "go.opentelemetry.io/otel/example/otel-collector", - "go.opentelemetry.io/otel/example/passthrough", - "go.opentelemetry.io/otel/example/zipkin", - "go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc", - "go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp", - "go.opentelemetry.io/otel/exporters/otlp/otlptrace", - "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc", - "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp", - "go.opentelemetry.io/otel/exporters/stdout/stdoutmetric", - "go.opentelemetry.io/otel/exporters/stdout/stdouttrace", - "go.opentelemetry.io/otel/exporters/zipkin", - "go.opentelemetry.io/otel/metric", - "go.opentelemetry.io/otel/sdk", - "go.opentelemetry.io/otel/sdk/metric", - "go.opentelemetry.io/otel/trace" - ] - }, - "experimental-metrics": { - "version": "v0.48.0", - "modules": [ - "go.opentelemetry.io/otel/example/prometheus", - "go.opentelemetry.io/otel/exporters/prometheus" - ] - }, - "experimental-logs": { - "version": "v0.2.0-alpha", - "modules": [ - "go.opentelemetry.io/otel/log", - "go.opentelemetry.io/otel/sdk/log", - "go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp", - "go.opentelemetry.io/otel/exporters/stdout/stdoutlog" - ] - }, - "experimental-schema": { - "version": "v0.0.8", - "modules": [ - "go.opentelemetry.io/otel/schema" - ] - } - }, - "excluded-modules": [ - "go.opentelemetry.io/otel/internal/tools" - ] - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "Cilium", - "file_name": "wildcard-from-endpoints.yaml" - }, - "content": { - "apiVersion": "cilium.io/v2", - "kind": "CiliumClusterwideNetworkPolicy", - "metadata": { - "name": "wildcard-from-endpoints" - }, - "spec": { - "description": "Policy for ingress allow to kube-dns from all Cilium managed endpoints in the cluster", - "endpointSelector": { - "matchLabels": { - "k8s:io.kubernetes.pod.namespace": "kube-system", - "k8s-app": "kube-dns" - } - }, - "ingress": [ - { - "fromEndpoints": [ - {} - ], - "toPorts": [ - { - "ports": [ - { - "port": "53", - "protocol": "UDP" - } - ] - } - ] - } - ] - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "Cilium", - "file_name": "world.yaml" - }, - "content": { - "apiVersion": "cilium.io/v2", - "kind": "CiliumNetworkPolicy", - "metadata": { - "name": "from-world-to-role-public" - }, - "spec": { - "endpointSelector": { - "matchLabels": { - "role": "public" - } - }, - "ingress": [ - { - "fromEntities": [ - "world" - ] - } - ] - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "CNI-Genie", - "file_name": ".codecov.yml" - }, - "content": { - "ignore": [ - "output_tests/.*" - ] - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "CNI-Genie", - "file_name": ".travis.yml" - }, - "content": { - "sudo": false, - "language": "go", - "go": [ - "1.7.3", - "1.8.1", - "tip" - ], - "matrix": { - "allow_failures": [ - { - "go": "tip" - } - ] - }, - "install": [ - "go get github.com/golang/lint/golint", - "export PATH=$GOPATH/bin:$PATH", - "go install ./..." - ], - "script": [ - "verify/all.sh -v", - "go test ./..." - ] - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "CNI-Genie", - "file_name": "admissionregistration.yaml" - }, - "content": { - "apiVersion": "admissionregistration.k8s.io/v1beta1", - "kind": "ValidatingWebhookConfiguration", - "metadata": { - "name": "config1" - }, - "webhooks": [ - { - "name": "genie-network-admission-controller.k8s.io", - "rules": [ - { - "operations": [ - "CREATE" - ], - "apiGroups": [ - "" - ], - "apiVersions": [ - "v1" - ], - "resources": [ - "logicalnetworks" - ] - } - ], - "failurePolicy": "Fail", - "clientConfig": { - "service": { - "namespace": "default", - "name": "genie-network-admission-controller" - }, - "caBundle": null - } - } - ] - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "CNI-Genie", - "file_name": "appveyor.yml" - }, - "content": { - "version": "0.{build}", - "skip_tags": true, - "cache": "C:\\Users\\appveyor\\AppData\\Local\\NuGet\\Cache", - "build_script": [ - "SET GOPATH=c:\\workspace", - "go test -v -race ./..." - ], - "test": false, - "clone_folder": "c:\\workspace\\src\\github.com\\hpcloud\\tail", - "branches": { - "only": [ - "master" - ] - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "CNI-Genie", - "file_name": "example-weavenet-crd-conf-in-file.yaml" - }, - "content": { - "apiVersion": "k8s.cni.cncf.io/v1", - "kind": "NetworkAttachmentDefinition", - "metadata": { - "name": "weave", - "namespace": "network" - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "CNI-Genie", - "file_name": "example-weavenet-crd-conf-in-spec.yaml" - }, - "content": { - "apiVersion": "k8s.cni.cncf.io/v1", - "kind": "NetworkAttachmentDefinition", - "metadata": { - "name": "weavenet" - }, - "spec": { - "config": "{ \"cniVersion\": \"0.3.0\", \"plugins\": [ { \"name\": \"weave\", \"type\": \"weave-net\", \"hairpinMode\": true }, { \"type\": \"portmap\", \"capabilities\": {\"portMappings\": true}, \"snat\": true } ] } " - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "CNI-Genie", - "file_name": "genie-complete.yaml" - }, - "content": { - "kind": "ClusterRole", - "apiVersion": "rbac.authorization.k8s.io/v1beta1", - "metadata": { - "name": "genie-plugin" - }, - "rules": [ - { - "apiGroups": [ - "" - ], - "resources": [ - "pods" - ], - "verbs": [ - "get", - "update", - "patch" - ] - }, - { - "apiGroups": [ - "alpha.network.k8s.io" - ], - "resources": [ - "logicalnetworks" - ], - "verbs": [ - "get", - "update", - "patch" - ] - }, - { - "apiGroups": [ - "alpha.network.k8s.io" - ], - "resources": [ - "physicalnetworks" - ], - "verbs": [ - "get", - "update", - "patch" - ] - }, - { - "apiGroups": [ - "k8s.cni.cncf.io" - ], - "resources": [ - "network-attachment-definitions" - ], - "verbs": [ - "get", - "update" - ] - }, - { - "apiGroups": [ - "" - ], - "resources": [ - "configmaps" - ], - "verbs": [ - "get" - ] - }, - { - "apiGroups": [ - "admissionregistration.k8s.io" - ], - "resources": [ - "validatingwebhookconfigurations" - ], - "verbs": [ - "get", - "update", - "create", - "delete" - ] - } - ] - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "CNI-Genie", - "file_name": "genie-complete.yaml" - }, - "content": { - "kind": "ClusterRole", - "apiVersion": "rbac.authorization.k8s.io/v1beta1", - "metadata": { - "name": "genie-policy" - }, - "rules": [ - { - "apiGroups": [ - "" - ], - "resources": [ - "networkpolicies" - ], - "verbs": [ - "get" - ] - }, - { - "apiGroups": [ - "" - ], - "resources": [ - "namespaces" - ], - "verbs": [ - "get" - ] - } - ] - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "CNI-Genie", - "file_name": "genie-complete.yaml" - }, - "content": { - "kind": "ClusterRoleBinding", - "apiVersion": "rbac.authorization.k8s.io/v1beta1", - "metadata": { - "name": "genie-plugin" - }, - "roleRef": { - "apiGroup": "rbac.authorization.k8s.io", - "kind": "ClusterRole", - "name": "genie-plugin" - }, - "subjects": [ - { - "kind": "ServiceAccount", - "name": "genie-plugin", - "namespace": "kube-system" - }, - { - "kind": "ServiceAccount", - "name": "genie-policy", - "namespace": "kube-system" - }, - { - "kind": "Group", - "name": "system:authenticated", - "apiGroup": "rbac.authorization.k8s.io" - } - ] - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "CNI-Genie", - "file_name": "genie-complete.yaml" - }, - "content": { - "kind": "ClusterRoleBinding", - "apiVersion": "rbac.authorization.k8s.io/v1beta1", - "metadata": { - "name": "genie-policy" - }, - "roleRef": { - "apiGroup": "rbac.authorization.k8s.io", - "kind": "ClusterRole", - "name": "genie-policy" - }, - "subjects": [ - { - "kind": "ServiceAccount", - "name": "genie-policy", - "namespace": "kube-system" - } - ] - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "CNI-Genie", - "file_name": "genie-complete.yaml" - }, - "content": { - "apiVersion": "v1", - "kind": "ServiceAccount", - "metadata": { - "name": "genie-plugin", - "namespace": "kube-system" - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "CNI-Genie", - "file_name": "genie-complete.yaml" - }, - "content": { - "apiVersion": "v1", - "kind": "ServiceAccount", - "metadata": { - "name": "genie-policy", - "namespace": "kube-system" - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "CNI-Genie", - "file_name": "genie-complete.yaml" - }, - "content": { - "kind": "ConfigMap", - "apiVersion": "v1", - "metadata": { - "name": "genie-config", - "namespace": "kube-system" - }, - "data": { - "cni_genie_network_config": "{\n \"name\": \"k8s-pod-network\",\n \"type\": \"genie\",\n \"cniVersion\": \"0.2.0\",\n \"log_level\": \"info\",\n \"datastore_type\": \"kubernetes\",\n \"hostname\": \"__KUBERNETES_NODE_NAME__\",\n \"policy\": {\n \"type\": \"k8s\",\n \"k8s_auth_token\": \"__SERVICEACCOUNT_TOKEN__\"\n },\n \"kubernetes\": {\n \"k8s_api_root\": \"https://__KUBERNETES_SERVICE_HOST__:__KUBERNETES_SERVICE_PORT__\",\n \"kubeconfig\": \"/etc/cni/net.d/genie-kubeconfig\"\n },\n \"romana_root\": \"http://__ROMANA_SERVICE_HOST__:__ROMANA_SERVICE_PORT__\",\n \"segment_label_name\": \"romanaSegment\"\n}" - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "CNI-Genie", - "file_name": "genie-complete.yaml" - }, - "content": { - "kind": "DaemonSet", - "apiVersion": "apps/v1", - "metadata": { - "name": "genie-plugin", - "namespace": "kube-system", - "labels": { - "k8s-app": "genie" - } - }, - "spec": { - "selector": { - "matchLabels": { - "k8s-app": "genie" - } - }, - "template": { - "metadata": { - "labels": { - "k8s-app": "genie" - }, - "annotations": { - "scheduler.alpha.kubernetes.io/critical-pod": "" - } - }, - "spec": { - "hostNetwork": true, - "hostPID": true, - "serviceAccountName": "genie-plugin", - "containers": [ - { - "name": "install-cni", - "image": "quay.io/huawei-cni-genie/genie-plugin:latest", - "imagePullPolicy": "Always", - "command": [ - "/launch.sh" - ], - "env": [ - { - "name": "CNI_NETWORK_CONFIG", - "valueFrom": { - "configMapKeyRef": { - "name": "genie-config", - "key": "cni_genie_network_config" - } - } - }, - { - "name": "KUBERNETES_NODE_NAME", - "valueFrom": { - "fieldRef": { - "fieldPath": "spec.nodeName" - } - } - } - ], - "volumeMounts": [ - { - "mountPath": "/host/opt/cni/bin", - "name": "cni-bin-dir" - }, - { - "mountPath": "/host/etc/cni/net.d", - "name": "cni-net-dir" - } - ] - } - ], - "tolerations": [ - { - "key": "CriticalAddonsOnly", - "operator": "Exists" - }, - { - "key": "node.kubernetes.io/not-ready", - "effect": "NoSchedule", - "operator": "Exists" - } - ], - "volumes": [ - { - "name": "cni-bin-dir", - "hostPath": { - "path": "/opt/cni/bin" - } - }, - { - "name": "cni-net-dir", - "hostPath": { - "path": "/etc/cni/net.d" - } - } - ] - } - } - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "CNI-Genie", - "file_name": "genie-complete.yaml" - }, - "content": { - "kind": "DaemonSet", - "apiVersion": "apps/v1", - "metadata": { - "name": "genie-network-admission-controller", - "namespace": "kube-system", - "labels": { - "role": "genie-network-admission-controller" - } - }, - "spec": { - "selector": { - "matchLabels": { - "role": "genie-network-admission-controller" - } - }, - "template": { - "metadata": { - "labels": { - "role": "genie-network-admission-controller" - }, - "annotations": { - "scheduler.alpha.kubernetes.io/critical-pod": "" - } - }, - "spec": { - "tolerations": [ - { - "key": "node-role.kubernetes.io/master", - "effect": "NoSchedule" - }, - { - "key": "node.kubernetes.io/not-ready", - "effect": "NoSchedule", - "operator": "Exists" - }, - { - "key": "CriticalAddonsOnly", - "operator": "Exists" - } - ], - "nodeSelector": { - "node-role.kubernetes.io/master": "" - }, - "hostNetwork": true, - "serviceAccountName": "genie-plugin", - "containers": [ - { - "name": "genie-network-admission-controller", - "image": "quay.io/huawei-cni-genie/genie-admission-controller:latest", - "imagePullPolicy": "Always", - "ports": [ - { - "containerPort": 8000 - } - ] - } - ] - } - } - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "CNI-Genie", - "file_name": "genie-complete.yaml" - }, - "content": { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "labels": { - "role": "genie-network-admission-controller" - }, - "name": "genie-network-admission-controller", - "namespace": "kube-system" - }, - "spec": { - "ports": [ - { - "port": 443, - "targetPort": 8000 - } - ], - "selector": { - "role": "genie-network-admission-controller" - } - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "CNI-Genie", - "file_name": "genie-complete.yaml" - }, - "content": { - "kind": "DaemonSet", - "apiVersion": "apps/v1", - "metadata": { - "name": "genie-policy-controller", - "namespace": "kube-system", - "labels": { - "k8s-app": "genie-policy" - } - }, - "spec": { - "selector": { - "matchLabels": { - "k8s-app": "genie-policy" - } - }, - "template": { - "metadata": { - "labels": { - "k8s-app": "genie-policy" - }, - "annotations": { - "scheduler.alpha.kubernetes.io/critical-pod": "", - "scheduler.alpha.kubernetes.io/tolerations": "[\n {\n \"key\": \"dedicated\",\n \"value\": \"master\",\n \"effect\": \"NoSchedule\"\n },\n {\n \"key\": \"CriticalAddonsOnly\",\n \"operator\": \"Exists\"\n }\n]\n" - } - }, - "spec": { - "hostNetwork": true, - "hostPID": true, - "serviceAccountName": "genie-policy", - "containers": [ - { - "name": "policy-engine", - "env": [ - { - "name": "NODE_NAME", - "valueFrom": { - "fieldRef": { - "fieldPath": "spec.nodeName" - } - } - } - ], - "image": "quay.io/huawei-cni-genie/genie-policy-controller:latest", - "imagePullPolicy": "Always", - "command": [ - "/genie-policy" - ], - "args": [ - "-kubeconfig=/etc/kubernetes/admin.conf", - "-logtostderr=true" - ], - "securityContext": { - "privileged": true - }, - "volumeMounts": [ - { - "name": "etc-kubernetes", - "mountPath": "/etc/kubernetes", - "readOnly": true - } - ] - } - ], - "volumes": [ - { - "name": "etc-kubernetes", - "hostPath": { - "path": "/etc/kubernetes" - } - } - ] - } - } - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "CNI-Genie", - "file_name": "genie-plugin.yaml" - }, - "content": { - "kind": "ClusterRole", - "apiVersion": "rbac.authorization.k8s.io/v1beta1", - "metadata": { - "name": "genie-plugin" - }, - "rules": [ - { - "apiGroups": [ - "" - ], - "resources": [ - "pods" - ], - "verbs": [ - "get", - "update", - "patch" - ] - }, - { - "apiGroups": [ - "alpha.network.k8s.io" - ], - "resources": [ - "logicalnetworks" - ], - "verbs": [ - "get", - "update", - "patch" - ] - }, - { - "apiGroups": [ - "alpha.network.k8s.io" - ], - "resources": [ - "physicalnetworks" - ], - "verbs": [ - "get", - "update", - "patch" - ] - }, - { - "apiGroups": [ - "k8s.cni.cncf.io" - ], - "resources": [ - "network-attachment-definitions" - ], - "verbs": [ - "get", - "update" - ] - }, - { - "apiGroups": [ - "" - ], - "resources": [ - "configmaps" - ], - "verbs": [ - "get" - ] - }, - { - "apiGroups": [ - "admissionregistration.k8s.io" - ], - "resources": [ - "validatingwebhookconfigurations" - ], - "verbs": [ - "get", - "update", - "create", - "delete" - ] - } - ] - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "CNI-Genie", - "file_name": "genie-plugin.yaml" - }, - "content": { - "kind": "ClusterRoleBinding", - "apiVersion": "rbac.authorization.k8s.io/v1beta1", - "metadata": { - "name": "genie-plugin" - }, - "roleRef": { - "apiGroup": "rbac.authorization.k8s.io", - "kind": "ClusterRole", - "name": "genie-plugin" - }, - "subjects": [ - { - "kind": "ServiceAccount", - "name": "genie-plugin", - "namespace": "kube-system" - }, - { - "kind": "Group", - "name": "system:authenticated", - "apiGroup": "rbac.authorization.k8s.io" - } - ] - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "CNI-Genie", - "file_name": "genie-plugin.yaml" - }, - "content": { - "apiVersion": "v1", - "kind": "ServiceAccount", - "metadata": { - "name": "genie-plugin", - "namespace": "kube-system" - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "CNI-Genie", - "file_name": "genie-plugin.yaml" - }, - "content": { - "kind": "ConfigMap", - "apiVersion": "v1", - "metadata": { - "name": "genie-config", - "namespace": "kube-system" - }, - "data": { - "cni_genie_network_config": "{\n \"name\": \"k8s-pod-network\",\n \"type\": \"genie\",\n \"cniVersion\": \"0.2.0\",\n \"log_level\": \"info\",\n \"datastore_type\": \"kubernetes\",\n \"hostname\": \"__KUBERNETES_NODE_NAME__\",\n \"policy\": {\n \"type\": \"k8s\",\n \"k8s_auth_token\": \"__SERVICEACCOUNT_TOKEN__\"\n },\n \"kubernetes\": {\n \"k8s_api_root\": \"https://__KUBERNETES_SERVICE_HOST__:__KUBERNETES_SERVICE_PORT__\",\n \"kubeconfig\": \"/etc/cni/net.d/genie-kubeconfig\"\n },\n \"romana_root\": \"http://__ROMANA_SERVICE_HOST__:__ROMANA_SERVICE_PORT__\",\n \"segment_label_name\": \"romanaSegment\"\n}" - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "CNI-Genie", - "file_name": "genie-plugin.yaml" - }, - "content": { - "kind": "DaemonSet", - "apiVersion": "apps/v1", - "metadata": { - "name": "genie-plugin", - "namespace": "kube-system", - "labels": { - "k8s-app": "genie" - } - }, - "spec": { - "selector": { - "matchLabels": { - "k8s-app": "genie" - } - }, - "template": { - "metadata": { - "labels": { - "k8s-app": "genie" - }, - "annotations": { - "scheduler.alpha.kubernetes.io/critical-pod": "" - } - }, - "spec": { - "hostNetwork": true, - "hostPID": true, - "serviceAccountName": "genie-plugin", - "containers": [ - { - "name": "install-cni", - "image": "quay.io/huawei-cni-genie/genie-plugin:latest", - "imagePullPolicy": "Always", - "command": [ - "/launch.sh" - ], - "env": [ - { - "name": "CNI_NETWORK_CONFIG", - "valueFrom": { - "configMapKeyRef": { - "name": "genie-config", - "key": "cni_genie_network_config" - } - } - }, - { - "name": "KUBERNETES_NODE_NAME", - "valueFrom": { - "fieldRef": { - "fieldPath": "spec.nodeName" - } - } - } - ], - "volumeMounts": [ - { - "mountPath": "/host/opt/cni/bin", - "name": "cni-bin-dir" - }, - { - "mountPath": "/host/etc/cni/net.d", - "name": "cni-net-dir" - } - ] - } - ], - "tolerations": [ - { - "key": "CriticalAddonsOnly", - "operator": "Exists" - }, - { - "key": "node.kubernetes.io/not-ready", - "effect": "NoSchedule", - "operator": "Exists" - } - ], - "volumes": [ - { - "name": "cni-bin-dir", - "hostPath": { - "path": "/opt/cni/bin" - } - }, - { - "name": "cni-net-dir", - "hostPath": { - "path": "/etc/cni/net.d" - } - } - ] - } - } - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "CNI-Genie", - "file_name": "genie-plugin.yaml" - }, - "content": { - "kind": "DaemonSet", - "apiVersion": "apps/v1", - "metadata": { - "name": "genie-network-admission-controller", - "namespace": "kube-system", - "labels": { - "role": "genie-network-admission-controller" - } - }, - "spec": { - "selector": { - "matchLabels": { - "role": "genie-network-admission-controller" - } - }, - "template": { - "metadata": { - "labels": { - "role": "genie-network-admission-controller" - }, - "annotations": { - "scheduler.alpha.kubernetes.io/critical-pod": "" - } - }, - "spec": { - "tolerations": [ - { - "key": "node-role.kubernetes.io/master", - "effect": "NoSchedule" - }, - { - "key": "node.kubernetes.io/not-ready", - "effect": "NoSchedule", - "operator": "Exists" - }, - { - "key": "CriticalAddonsOnly", - "operator": "Exists" - } - ], - "nodeSelector": { - "node-role.kubernetes.io/master": "" - }, - "hostNetwork": true, - "serviceAccountName": "genie-plugin", - "containers": [ - { - "name": "genie-network-admission-controller", - "image": "quay.io/huawei-cni-genie/genie-admission-controller:latest", - "imagePullPolicy": "Always", - "ports": [ - { - "containerPort": 8000 - } - ] - } - ] - } - } - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "CNI-Genie", - "file_name": "genie-plugin.yaml" - }, - "content": { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "labels": { - "role": "genie-network-admission-controller" - }, - "name": "genie-network-admission-controller", - "namespace": "kube-system" - }, - "spec": { - "ports": [ - { - "port": 443, - "targetPort": 8000 - } - ], - "selector": { - "role": "genie-network-admission-controller" - } - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "CNI-Genie", - "file_name": "genie.yaml" - }, - "content": { - "kind": "ClusterRole", - "apiVersion": "rbac.authorization.k8s.io/v1beta1", - "metadata": { - "name": "genie" - }, - "rules": [ - { - "apiGroups": [ - "" - ], - "resources": [ - "pods" - ], - "verbs": [ - "get", - "update", - "patch" - ] - }, - { - "apiGroups": [ - "alpha.network.k8s.io" - ], - "resources": [ - "logicalnetworks" - ], - "verbs": [ - "get", - "update" - ] - }, - { - "apiGroups": [ - "alpha.network.k8s.io" - ], - "resources": [ - "physicalnetworks" - ], - "verbs": [ - "get", - "update" - ] - }, - { - "apiGroups": [ - "" - ], - "resources": [ - "nodes" - ], - "verbs": [ - "list", - "watch" - ] - }, - { - "apiGroups": [ - "" - ], - "resources": [ - "nodes/status" - ], - "verbs": [ - "patch" - ] - } - ] - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "CNI-Genie", - "file_name": "genie.yaml" - }, - "content": { - "kind": "ClusterRoleBinding", - "apiVersion": "rbac.authorization.k8s.io/v1beta1", - "metadata": { - "name": "genie" - }, - "roleRef": { - "apiGroup": "rbac.authorization.k8s.io", - "kind": "ClusterRole", - "name": "genie" - }, - "subjects": [ - { - "kind": "ServiceAccount", - "name": "genie", - "namespace": "kube-system" - }, - { - "kind": "Group", - "name": "system:authenticated", - "apiGroup": "rbac.authorization.k8s.io" - } - ] - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "CNI-Genie", - "file_name": "genie.yaml" - }, - "content": { - "apiVersion": "v1", - "kind": "ServiceAccount", - "metadata": { - "name": "genie", - "namespace": "kube-system" - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "CNI-Genie", - "file_name": "genie.yaml" - }, - "content": { - "kind": "ConfigMap", - "apiVersion": "v1", - "metadata": { - "name": "genie-config", - "namespace": "kube-system" - }, - "data": { - "cni_genie_network_config": "{\n \"name\": \"k8s-pod-network\",\n \"type\": \"genie\",\n \"log_level\": \"info\",\n \"datastore_type\": \"kubernetes\",\n \"hostname\": \"__KUBERNETES_NODE_NAME__\",\n \"policy\": {\n \"type\": \"k8s\",\n \"k8s_auth_token\": \"__SERVICEACCOUNT_TOKEN__\"\n },\n \"kubernetes\": {\n \"k8s_api_root\": \"https://__KUBERNETES_SERVICE_HOST__:__KUBERNETES_SERVICE_PORT__\",\n \"kubeconfig\": \"/etc/cni/net.d/genie-kubeconfig\"\n },\n \"romana_root\": \"http://__ROMANA_SERVICE_HOST__:__ROMANA_SERVICE_PORT__\",\n \"segment_label_name\": \"romanaSegment\"\n}" - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "CNI-Genie", - "file_name": "genie.yaml" - }, - "content": { - "kind": "DaemonSet", - "apiVersion": "extensions/v1beta1", - "metadata": { - "name": "genie-plugin", - "namespace": "kube-system", - "labels": { - "k8s-app": "genie" - } - }, - "spec": { - "selector": { - "matchLabels": { - "k8s-app": "genie" - } - }, - "template": { - "metadata": { - "labels": { - "k8s-app": "genie" - }, - "annotations": { - "scheduler.alpha.kubernetes.io/critical-pod": "", - "scheduler.alpha.kubernetes.io/tolerations": "[\n {\n \"key\": \"dedicated\", \n \"value\": \"master\", \n \"effect\": \"NoSchedule\" \n },\n {\n \"key\": \"CriticalAddonsOnly\", \n \"operator\": \"Exists\"\n }\n]\n" - } - }, - "spec": { - "hostNetwork": true, - "hostPID": true, - "serviceAccountName": "genie", - "containers": [ - { - "name": "install-cni", - "image": "cnigenie/genie-plugin:v2.0", - "command": [ - "/launch.sh" - ], - "env": [ - { - "name": "CNI_NETWORK_CONFIG", - "valueFrom": { - "configMapKeyRef": { - "name": "genie-config", - "key": "cni_genie_network_config" - } - } - }, - { - "name": "KUBERNETES_NODE_NAME", - "valueFrom": { - "fieldRef": { - "fieldPath": "spec.nodeName" - } - } - } - ], - "volumeMounts": [ - { - "mountPath": "/host/opt/cni/bin", - "name": "cni-bin-dir" - }, - { - "mountPath": "/host/etc/cni/net.d", - "name": "cni-net-dir" - } - ] - } - ], - "volumes": [ - { - "name": "cni-bin-dir", - "hostPath": { - "path": "/opt/cni/bin" - } - }, - { - "name": "cni-net-dir", - "hostPath": { - "path": "/etc/cni/net.d" - } - } - ] - } - } - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "CNI-Genie", - "file_name": "license.yml" - }, - "content": { - "import": "../../../../fossene/db/schema/thing.yml", - "fields": { - "site": "string", - "author": "root" - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "CNI-Genie", - "file_name": "logicalnet-dedicated.yaml" - }, - "content": { - "apiVersion": "alpha.network.k8s.io/v1", - "kind": "Logicalnetwork", - "metadata": { - "name": "net1", - "namespace": "default" - }, - "spec": { - "physicalNet": "phynet1", - "sub_subnet": "10.32.0.0/24" - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "CNI-Genie", - "file_name": "logicalnet-shared.yaml" - }, - "content": { - "apiVersion": "alpha.network.k8s.io/v1", - "kind": "Logicalnetwork", - "metadata": { - "name": "net2", - "namespace": "default" - }, - "spec": { - "physicalNet": "phynet2", - "plugin": "flannel", - "sub_subnet": "10.244.0.0/24" - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "CNI-Genie", - "file_name": "logicalnetwork-crd.yaml" - }, - "content": { - "apiVersion": "apiextensions.k8s.io/v1beta1", - "kind": "CustomResourceDefinition", - "metadata": { - "name": "logicalnetworks.alpha.network.k8s.io" - }, - "spec": { - "scope": "Namespaced", - "group": "alpha.network.k8s.io", - "version": "v1", - "names": { - "kind": "Logicalnetwork", - "plural": "logicalnetworks", - "singular": "logicalnetwork" - } - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "CNI-Genie", - "file_name": "net1.yaml" - }, - "content": { - "apiVersion": "alpha.network.k8s.io/v1", - "kind": "Network", - "metadata": { - "name": "net1", - "namespace": "default" - }, - "spec": { - "plugin": "flannel" - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "CNI-Genie", - "file_name": "netattachdef-crd.yaml" - }, - "content": { - "apiVersion": "apiextensions.k8s.io/v1beta1", - "kind": "CustomResourceDefinition", - "metadata": { - "name": "network-attachment-definitions.k8s.cni.cncf.io" - }, - "spec": { - "group": "k8s.cni.cncf.io", - "version": "v1", - "scope": "Namespaced", - "names": { - "plural": "network-attachment-definitions", - "singular": "network-attachment-definition", - "kind": "NetworkAttachmentDefinition", - "shortNames": [ - "net-attach-def" - ] - }, - "validation": { - "openAPIV3Schema": { - "properties": { - "spec": { - "properties": { - "config": { - "type": "string" - } - } - } - } - } - } - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "CNI-Genie", - "file_name": "network-crd.yaml" - }, - "content": { - "apiVersion": "apiextensions.k8s.io/v1beta1", - "kind": "CustomResourceDefinition", - "metadata": { - "name": "networks.alpha.network.k8s.io" - }, - "spec": { - "scope": "Namespaced", - "group": "alpha.network.k8s.io", - "version": "v1", - "names": { - "kind": "Network", - "plural": "networks", - "singular": "network" - } - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "CNI-Genie", - "file_name": "physicalnet-dedicated.yaml" - }, - "content": { - "apiVersion": "alpha.network.k8s.io/v1", - "kind": "Physicalnetwork", - "metadata": { - "name": "phynet1", - "namespace": "default" - }, - "spec": { - "refer_nic": "eth0", - "sharedStatus": { - "dedicatedNet": true, - "plugin": "weave", - "subnet": "10.32.0.0/16" - } - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "CNI-Genie", - "file_name": "physicalnet-shared.yaml" - }, - "content": { - "apiVersion": "alpha.network.k8s.io/v1", - "kind": "Physicalnetwork", - "metadata": { - "name": "phynet2", - "namespace": "default" - }, - "spec": { - "refer_nic": "eth1", - "sharedStaus": { - "dedicatedNet": false - } - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "CNI-Genie", - "file_name": "physicalnetwork-crd.yaml" - }, - "content": { - "apiVersion": "apiextensions.k8s.io/v1beta1", - "kind": "CustomResourceDefinition", - "metadata": { - "name": "physicalnetworks.alpha.network.k8s.io" - }, - "spec": { - "scope": "Namespaced", - "group": "alpha.network.k8s.io", - "version": "v1", - "names": { - "kind": "Physicalnetwork", - "plural": "physicalnetworks", - "singular": "physicalnetwork" - } - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "CNI-Genie", - "file_name": "pod-bridge.yaml" - }, - "content": { - "apiVersion": "v1", - "kind": "Pod", - "metadata": { - "name": "nginx-weave", - "labels": { - "app": "web" - }, - "annotations": { - "cni": "bridge" - } - }, - "spec": { - "containers": [ - { - "name": "key-value-store", - "image": "nginx:latest", - "imagePullPolicy": "IfNotPresent", - "ports": [ - { - "containerPort": 6379 - } - ] - } - ] - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "CNI-Genie", - "file_name": "pod-calico.yaml" - }, - "content": { - "apiVersion": "v1", - "kind": "Pod", - "metadata": { - "name": "nginx-canal", - "labels": { - "app": "web" - }, - "annotations": { - "cni": "calico" - } - }, - "spec": { - "containers": [ - { - "name": "key-value-store", - "image": "nginx:latest", - "imagePullPolicy": "IfNotPresent", - "ports": [ - { - "containerPort": 6379 - } - ] - } - ] - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "CNI-Genie", - "file_name": "pod-flannel.yaml" - }, - "content": { - "apiVersion": "v1", - "kind": "Pod", - "metadata": { - "name": "nginx-flannel", - "labels": { - "app": "web" - }, - "annotations": { - "cni": "flannel" - } - }, - "spec": { - "containers": [ - { - "name": "key-value-store", - "image": "nginx:latest", - "imagePullPolicy": "IfNotPresent", - "ports": [ - { - "containerPort": 6379 - } - ] - } - ] - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "CNI-Genie", - "file_name": "pod-macvlan.yaml" - }, - "content": { - "apiVersion": "v1", - "kind": "Pod", - "metadata": { - "name": "nginx-macvlan", - "labels": { - "app": "web" - }, - "annotations": { - "cni": "macvlan" - } - }, - "spec": { - "containers": [ - { - "name": "key-value-store", - "image": "nginx:latest", - "imagePullPolicy": "IfNotPresent", - "ports": [ - { - "containerPort": 6379 - } - ] - } - ] - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "CNI-Genie", - "file_name": "pod-multi-networks.yaml" - }, - "content": { - "apiVersion": "v1", - "kind": "Pod", - "metadata": { - "name": "nginx-multi-network-pod", - "labels": { - "app": "web" - }, - "annotations": { - "cni": "", - "networks": "net1@eth0,net2@eth4" - } - }, - "spec": { - "containers": [ - { - "name": "key-value-store", - "image": "busybox", - "command": [ - "top" - ], - "imagePullPolicy": "IfNotPresent" - } - ] - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "CNI-Genie", - "file_name": "pod-multiip.yaml" - }, - "content": { - "apiVersion": "v1", - "kind": "Pod", - "metadata": { - "name": "nginx-multiip", - "labels": { - "app": "web" - }, - "annotations": { - "cni": "flannel,calico,weave", - "multi-ip-preferences": "{\n \"multi_entry\": 0,\n \"ips\": {\n \"\": {\n \"ip\": \"\",\n \"interface\": \"\"\n }\n }\n}\n" - } - }, - "spec": { - "containers": [ - { - "name": "key-value-store", - "image": "nginx:latest", - "imagePullPolicy": "IfNotPresent", - "ports": [ - { - "containerPort": 6379 - } - ] - } - ] - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "CNI-Genie", - "file_name": "pod-net1.yaml" - }, - "content": { - "apiVersion": "v1", - "kind": "Pod", - "metadata": { - "name": "nginx-flannel2", - "labels": { - "app": "web" - }, - "annotations": { - "cni": "", - "networks": "net1" - } - }, - "spec": { - "containers": [ - { - "name": "key-value-store", - "image": "nginx:latest", - "imagePullPolicy": "IfNotPresent", - "ports": [ - { - "containerPort": 6379 - } - ] - } - ] - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "CNI-Genie", - "file_name": "pod-nocni.yaml" - }, - "content": { - "apiVersion": "v1", - "kind": "Pod", - "metadata": { - "name": "nginx-nocni", - "labels": { - "app": "web" - }, - "annotations": { - "cni": "" - } - }, - "spec": { - "containers": [ - { - "name": "key-value-store", - "image": "nginx:latest", - "imagePullPolicy": "IfNotPresent", - "ports": [ - { - "containerPort": 6379 - } - ] - } - ] - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "CNI-Genie", - "file_name": "pod-plugin-with-ifname.yaml" - }, - "content": { - "apiVersion": "v1", - "kind": "Pod", - "metadata": { - "name": "nginx-plugin-with-ifname", - "labels": { - "app": "web" - }, - "annotations": { - "cni": "flannel,weave@eth4,flannel@eth3" - } - }, - "spec": { - "containers": [ - { - "name": "key-value-store", - "image": "nginx:latest", - "imagePullPolicy": "IfNotPresent", - "ports": [ - { - "containerPort": 6379 - } - ] - } - ] - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "CNI-Genie", - "file_name": "pod-romana.yaml" - }, - "content": { - "apiVersion": "v1", - "kind": "Pod", - "metadata": { - "name": "nginx-romana", - "labels": { - "app": "web" - }, - "annotations": { - "cni": "romana" - } - }, - "spec": { - "containers": [ - { - "name": "key-value-store", - "image": "nginx:latest", - "imagePullPolicy": "IfNotPresent", - "ports": [ - { - "containerPort": 6379 - } - ] - } - ] - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "CNI-Genie", - "file_name": "pod-single-network.yaml" - }, - "content": { - "apiVersion": "v1", - "kind": "Pod", - "metadata": { - "name": "nginx-single-network-pod", - "labels": { - "app": "web" - }, - "annotations": { - "cni": "", - "networks": "net1" - } - }, - "spec": { - "containers": [ - { - "name": "key-value-store", - "image": "busybox", - "command": [ - "top" - ], - "imagePullPolicy": "IfNotPresent" - } - ] - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "CNI-Genie", - "file_name": "pod-sriov.yaml" - }, - "content": { - "apiVersion": "v1", - "kind": "Pod", - "metadata": { - "name": "nginx-sriov", - "labels": { - "app": "web" - }, - "annotations": { - "cni": "sriov" - } - }, - "spec": { - "containers": [ - { - "name": "key-value-store", - "image": "nginx:latest", - "imagePullPolicy": "IfNotPresent", - "ports": [ - { - "containerPort": 6379 - } - ] - } - ] - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "CNI-Genie", - "file_name": "pod-using-netattachdef-format-json.yaml" - }, - "content": { - "apiVersion": "v1", - "kind": "Pod", - "metadata": { - "name": "nginx-flannel-weave-crd", - "annotations": { - "k8s.v1.cni.cncf.io/networks": "[\n {\n \"name\":\"flannel\",\n \"interface\": \"eth1\"\n },\n {\n \"name\":\"weavenet\",\n \"namespace\": \"network\",\n \"interface\": \"eth5\"\n }\n]\n" - } - }, - "spec": { - "containers": [ - { - "name": "key-value-store", - "image": "nginx:latest", - "imagePullPolicy": "IfNotPresent", - "ports": [ - { - "containerPort": 80 - } - ] - } - ] - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "CNI-Genie", - "file_name": "pod-using-netattachdef-format-names.yaml" - }, - "content": { - "apiVersion": "v1", - "kind": "Pod", - "metadata": { - "name": "nginx-netattachdef-flannel-weave", - "annotations": { - "k8s.v1.cni.cncf.io/networks": "flannel@eth1, network/weavenet@eth5" - } - }, - "spec": { - "containers": [ - { - "name": "key-value-store", - "image": "nginx:latest", - "imagePullPolicy": "IfNotPresent", - "ports": [ - { - "containerPort": 80 - } - ] - } - ] - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "CNI-Genie", - "file_name": "pod-weave.yaml" - }, - "content": { - "apiVersion": "v1", - "kind": "Pod", - "metadata": { - "name": "nginx-weave", - "labels": { - "app": "web" - }, - "annotations": { - "cni": "weave" - } - }, - "spec": { - "containers": [ - { - "name": "key-value-store", - "image": "nginx:latest", - "imagePullPolicy": "IfNotPresent", - "ports": [ - { - "containerPort": 6379 - } - ] - } - ] - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "CNI-Genie", - "file_name": "pod.yaml" - }, - "content": { - "apiVersion": "v1", - "kind": "Pod", - "metadata": { - "labels": { - "role": "genie-network-admission-controller" - }, - "name": "genie-network-admission-controller" - }, - "spec": { - "containers": [ - { - "name": "genie-network-admission-controller", - "image": "genie-network-admission-controller:latest", - "imagePullPolicy": "IfNotPresent", - "ports": [ - { - "containerPort": 8000 - } - ] - } - ] - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "CNI-Genie", - "file_name": "romana-kubeadm.yml" - }, - "content": { - "apiVersion": "v1", - "kind": "ServiceAccount", - "metadata": { - "name": "romana-services", - "namespace": "kube-system" - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "CNI-Genie", - "file_name": "romana-kubeadm.yml" - }, - "content": { - "apiVersion": "v1", - "kind": "Secret", - "type": "Opaque", - "metadata": { - "name": "romana-secrets", - "namespace": "kube-system" - }, - "data": { - "datastore-password": "cm9tYW5h" - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "CNI-Genie", - "file_name": "romana-kubeadm.yml" - }, - "content": { - "apiVersion": "extensions/v1beta1", - "kind": "Deployment", - "metadata": { - "name": "romana-services", - "namespace": "kube-system" - }, - "spec": { - "replicas": 1, - "template": { - "metadata": { - "labels": { - "app": "romana-services" - } - }, - "spec": { - "hostNetwork": true, - "serviceAccountName": "romana-services", - "containers": [ - { - "name": "romana-etcd", - "image": "gcr.io/google_containers/etcd-amd64:3.0.14-kubeadm", - "command": [ - "etcd", - "--listen-client-urls=http://127.0.0.1:12379", - "--listen-peer-urls=http://127.0.0.1:12380", - "--advertise-client-urls=http://127.0.0.1:12379", - "--data-dir=/var/etcd/data" - ], - "volumeMounts": [ - { - "name": "etcd-data", - "mountPath": "/var/etcd/data" - } - ], - "livenessProbe": { - "httpGet": { - "path": "/health", - "port": 12379, - "host": "127.0.0.1" - }, - "initialDelaySeconds": 15, - "timeoutSeconds": 15 - } - }, - { - "name": "romana-datastore", - "image": "mysql:5", - "env": [ - { - "name": "MYSQL_ROOT_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "name": "romana-secrets", - "key": "datastore-password" - } - } - } - ], - "volumeMounts": [ - { - "name": "mysql-data", - "mountPath": "/var/lib/mysql" - } - ] - }, - { - "name": "romana-services", - "image": "quay.io/romana/services:v1.0.1", - "imagePullPolicy": "Always", - "args": [ - "--cidr=100.112.0.0/12" - ], - "env": [ - { - "name": "MYSQL_ROOT_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "name": "romana-secrets", - "key": "datastore-password" - } - } - } - ], - "volumeMounts": [ - { - "name": "log-path", - "mountPath": "/var/log/romana" - } - ] - } - ], - "volumes": [ - { - "name": "etcd-data", - "hostPath": { - "path": "/var/lib/romana/etcd-db" - } - }, - { - "name": "mysql-data", - "hostPath": { - "path": "/var/lib/romana/mysql-db" - } - }, - { - "name": "log-path", - "hostPath": { - "path": "/var/log/romana" - } - } - ] - } - } - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "CNI-Genie", - "file_name": "romana-kubeadm.yml" - }, - "content": { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "name": "romana-root", - "namespace": "kube-system" - }, - "spec": { - "ports": [ - { - "name": "root", - "port": 9600, - "protocol": "TCP", - "targetPort": 9600 - } - ], - "selector": { - "app": "romana-services" - }, - "sessionAffinity": "None", - "type": "ClusterIP" - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "CNI-Genie", - "file_name": "romana-kubeadm.yml" - }, - "content": { - "apiVersion": "extensions/v1beta1", - "kind": "DaemonSet", - "metadata": { - "name": "romana-agent", - "namespace": "kube-system" - }, - "spec": { - "template": { - "metadata": { - "labels": { - "app": "romana-agent" - } - }, - "spec": { - "hostNetwork": true, - "containers": [ - { - "name": "romana-agent", - "image": "quay.io/romana/agent:v1.0.1", - "imagePullPolicy": "Always", - "args": [ - "--cluster-ip-cidr=10.96.0.0/12", - "--cni-image=quay.io/romana/cni:v1.0.1" - ], - "securityContext": { - "privileged": true - }, - "volumeMounts": [ - { - "name": "host-usr-local-bin", - "mountPath": "/host/usr/local/bin" - }, - { - "name": "host-etc-romana", - "mountPath": "/host/etc/romana" - }, - { - "name": "host-cni-bin", - "mountPath": "/host/opt/cni/bin" - }, - { - "name": "host-cni-net-d", - "mountPath": "/host/etc/cni/net.d" - }, - { - "name": "log-path", - "mountPath": "/var/log/romana" - } - ] - } - ], - "volumes": [ - { - "name": "host-usr-local-bin", - "hostPath": { - "path": "/usr/local/bin" - } - }, - { - "name": "host-etc-romana", - "hostPath": { - "path": "/etc/romana" - } - }, - { - "name": "host-cni-bin", - "hostPath": { - "path": "/opt/cni/bin" - } - }, - { - "name": "host-cni-net-d", - "hostPath": { - "path": "/etc/cni/net.d" - } - }, - { - "name": "log-path", - "hostPath": { - "path": "/var/log/romana" - } - } - ] - } - } - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "CNI-Genie", - "file_name": "service.yaml" - }, - "content": { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "labels": { - "role": "genie-network-admission-controller" - }, - "name": "genie-network-admission-controller" - }, - "spec": { - "ports": [ - { - "port": 443, - "targetPort": 8000 - } - ], - "selector": { - "role": "genie-network-admission-controller" - } - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "Container Network Interface (CNI)", - "file_name": ".golangci.yml" - }, - "content": { - "linters": { - "enable": [ - "contextcheck", - "errcheck", - "errorlint", - "gci", - "ginkgolinter", - "gocritic", - "gofumpt", - "govet", - "ineffassign", - "misspell", - "nolintlint", - "nonamedreturns", - "predeclared", - "staticcheck", - "typecheck", - "unconvert", - "unused", - "whitespace" - ] - }, - "linters-settings": { - "gci": { - "sections": [ - "standard", - "default", - "prefix(github.com/containernetworking)" - ] - } - }, - "run": { - "timeout": "5m" - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "Container Network Interface (CNI)", - "file_name": "action.yml" - }, - "content": { - "name": "Re-Test", - "description": "Re-Runs the last workflow for a PR", - "inputs": { - "token": { - "description": "GitHub API Token", - "required": true - } - }, - "runs": { - "using": "docker", - "image": "Dockerfile", - "env": { - "GITHUB_TOKEN": "${{ inputs.token }}" - } - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "Container Network Interface (CNI)", - "file_name": "commands.yml" - }, - "content": { - "name": "commands", - "true": { - "issue_comment": { - "types": [ - "created" - ] - } - }, - "jobs": { - "retest": { - "if": "github.repository == 'containernetworking/cni'", - "runs-on": "ubuntu-latest", - "steps": [ - { - "name": "Check out code", - "uses": "actions/checkout@v4" - }, - { - "name": "Re-Test Action", - "uses": "./.github/actions/retest-action", - "with": { - "token": "${{ secrets.REPO_ACCESS_TOKEN }}" - } - } - ] - } - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "DANM", - "file_name": ".travis.yml" - }, - "content": { - "sudo": "required", - "dist": "xenial", - "arch": [ - "arm64", - "amd64" - ], - "env": [ - "TRAVIS_PIPELINE=docker" - ], - "language": "go", - "go": [ - "1.16.x" - ], - "services": "docker", - "install": [ - "go get golang.org/x/tools/cmd/cover", - "go get github.com/mattn/goveralls" - ], - "script": [ - "./build_danm.sh", - "./run_uts.sh", - "$GOPATH/bin/goveralls -coverprofile=ut/coverage/coverage3.out -service=travis-ci -repotoken ZY6MA490QABNKGnJgYLi53QTDuTC4H69K" - ] - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "DANM", - "file_name": "0danm-installer-rbac.yaml" - }, - "content": { - "apiVersion": "v1", - "kind": "ServiceAccount", - "metadata": { - "name": "danm-installer", - "namespace": "kube-system" - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "DANM", - "file_name": "0danm-installer-rbac.yaml" - }, - "content": { - "apiVersion": "rbac.authorization.k8s.io/v1", - "kind": "ClusterRole", - "metadata": { - "name": "caas:danm-installer" - }, - "rules": [ - { - "apiGroups": [ - "apiextensions.k8s.io" - ], - "resources": [ - "customresourcedefinitions" - ], - "verbs": [ - "*" - ] - }, - { - "apiGroups": [ - "rbac.authorization.k8s.io" - ], - "resources": [ - "clusterroles", - "clusterrolebindings" - ], - "verbs": [ - "get", - "create", - "bind", - "patch" - ] - }, - { - "apiGroups": [ - "*" - ], - "resources": [ - "serviceaccounts" - ], - "verbs": [ - "create", - "get", - "patch" - ] - }, - { - "apiGroups": [ - "*" - ], - "resources": [ - "secrets" - ], - "verbs": [ - "get" - ] - }, - { - "apiGroups": [ - "" - ], - "resources": [ - "pods" - ], - "verbs": [ - "get", - "watch", - "list" - ] - }, - { - "apiGroups": [ - "danm.io" - ], - "resources": [ - "clusternetworks", - "danmeps", - "danmnets", - "tenantnetworks", - "tenantconfigs" - ], - "verbs": [ - "*" - ] - }, - { - "apiGroups": [ - "apps" - ], - "resources": [ - "daemonsets", - "deployments" - ], - "verbs": [ - "get", - "create", - "patch" - ] - }, - { - "apiGroups": [ - "" - ], - "resources": [ - "configmaps", - "secrets", - "services" - ], - "verbs": [ - "get", - "create", - "patch" - ] - }, - { - "apiGroups": [ - "certificates.k8s.io" - ], - "resources": [ - "certificatesigningrequests" - ], - "verbs": [ - "get", - "list", - "watch", - "create", - "update", - "patch", - "approve", - "delete" - ] - }, - { - "apiGroups": [ - "certificates.k8s.io" - ], - "resources": [ - "certificatesigningrequests/approval" - ], - "verbs": [ - "update" - ] - }, - { - "apiGroups": [ - "certificates.k8s.io" - ], - "resources": [ - "signers" - ], - "resourceNames": [ - "kubernetes.io/legacy-unknown" - ], - "verbs": [ - "approve" - ] - }, - { - "apiGroups": [ - "admissionregistration.k8s.io" - ], - "resources": [ - "mutatingwebhookconfigurations" - ], - "verbs": [ - "get", - "create", - "patch" - ] - }, - { - "apiGroups": [ - "k8s.cni.cncf.io" - ], - "resources": [ - "network-attachment-definitions" - ], - "verbs": [ - "get", - "list", - "watch", - "update" - ] - }, - { - "apiGroups": [ - "" - ], - "resources": [ - "endpoints" - ], - "verbs": [ - "list", - "watch", - "get", - "update", - "create", - "delete" - ] - }, - { - "apiGroups": [ - "" - ], - "resources": [ - "events" - ], - "verbs": [ - "create", - "update", - "get" - ] - }, - { - "apiGroups": [ - "" - ], - "resources": [ - "services" - ], - "verbs": [ - "list", - "watch" - ] - } - ] - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "DANM", - "file_name": "0danm-installer-rbac.yaml" - }, - "content": { - "apiVersion": "rbac.authorization.k8s.io/v1", - "kind": "ClusterRoleBinding", - "metadata": { - "name": "caas:danm-installer" - }, - "roleRef": { - "apiGroup": "rbac.authorization.k8s.io", - "kind": "ClusterRole", - "name": "caas:danm-installer" - }, - "subjects": [ - { - "kind": "ServiceAccount", - "name": "danm-installer", - "namespace": "kube-system" - } - ] - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "DANM", - "file_name": "0netwatcher_rbac.yaml" - }, - "content": { - "apiVersion": "v1", - "kind": "ServiceAccount", - "metadata": { - "name": "netwatcher", - "namespace": "kube-system", - "labels": { - "kubernetes.io/cluster-service": "true" - } - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "DANM", - "file_name": "0netwatcher_rbac.yaml" - }, - "content": { - "apiVersion": "rbac.authorization.k8s.io/v1", - "kind": "ClusterRole", - "metadata": { - "labels": { - "kubernetes.io/bootstrapping": "rbac-defaults" - }, - "name": "system:netwatcher" - }, - "rules": [ - { - "apiGroups": [ - "danm.io" - ], - "resources": [ - "danmnets", - "clusternetworks", - "tenantnetworks" - ], - "verbs": [ - "get", - "list", - "watch", - "update" - ] - }, - { - "apiGroups": [ - "k8s.cni.cncf.io" - ], - "resources": [ - "network-attachment-definitions" - ], - "verbs": [ - "get", - "list", - "watch", - "update" - ] - } - ] - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "DANM", - "file_name": "0netwatcher_rbac.yaml" - }, - "content": { - "apiVersion": "rbac.authorization.k8s.io/v1", - "kind": "ClusterRoleBinding", - "metadata": { - "annotations": { - "rbac.authorization.kubernetes.io/autoupdate": "true" - }, - "labels": { - "kubernetes.io/bootstrapping": "rbac-defaults" - }, - "name": "system:netwatcher" - }, - "roleRef": { - "apiGroup": "rbac.authorization.k8s.io", - "kind": "ClusterRole", - "name": "system:netwatcher" - }, - "subjects": [ - { - "kind": "ServiceAccount", - "namespace": "kube-system", - "name": "netwatcher" - } - ] - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "DANM", - "file_name": "0svcwatcher_rbac.yaml" - }, - "content": { - "apiVersion": "v1", - "kind": "ServiceAccount", - "metadata": { - "name": "svcwatcher", - "namespace": "kube-system", - "labels": { - "kubernetes.io/cluster-service": "true" - } - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "DANM", - "file_name": "0svcwatcher_rbac.yaml" - }, - "content": { - "apiVersion": "rbac.authorization.k8s.io/v1", - "kind": "ClusterRole", - "metadata": { - "labels": { - "kubernetes.io/bootstrapping": "rbac-defaults" - }, - "name": "system:svcwatcher" - }, - "rules": [ - { - "apiGroups": [ - "" - ], - "resources": [ - "endpoints" - ], - "verbs": [ - "list", - "watch", - "get", - "update", - "create", - "delete" - ] - }, - { - "apiGroups": [ - "" - ], - "resources": [ - "services", - "pods" - ], - "verbs": [ - "list", - "watch", - "get" - ] - }, - { - "apiGroups": [ - "" - ], - "resources": [ - "events" - ], - "verbs": [ - "create", - "update", - "get" - ] - }, - { - "apiGroups": [ - "danm.io" - ], - "resources": [ - "danmeps" - ], - "verbs": [ - "get", - "list", - "watch", - "create", - "update", - "patch", - "delete" - ] - } - ] - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "DANM", - "file_name": "0svcwatcher_rbac.yaml" - }, - "content": { - "apiVersion": "rbac.authorization.k8s.io/v1", - "kind": "ClusterRoleBinding", - "metadata": { - "annotations": { - "rbac.authorization.kubernetes.io/autoupdate": "true" - }, - "labels": { - "kubernetes.io/bootstrapping": "rbac-defaults" - }, - "name": "system:svcwatcher" - }, - "roleRef": { - "apiGroup": "rbac.authorization.k8s.io", - "kind": "ClusterRole", - "name": "system:svcwatcher" - }, - "subjects": [ - { - "kind": "ServiceAccount", - "namespace": "kube-system", - "name": "svcwatcher" - } - ] - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "DANM", - "file_name": "0_wrong_tconf.yaml" - }, - "content": { - "apiVersion": "danm.io/v1", - "kind": "TenantConfig", - "metadata": { - "name": "wrong-tconf" - }, - "hostDevices": [ - { - "name": "ens4", - "vniType": "vlan" - } - ], - "networkIds": { - "flannel": "flannel" - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "DANM", - "file_name": "10_good_deployment.yaml" - }, - "content": { - "apiVersion": "apps/v1", - "kind": "Deployment", - "metadata": { - "name": "test-deployment", - "namespace": "default" - }, - "spec": { - "selector": { - "matchLabels": { - "app": "test-deployment" - } - }, - "replicas": 1, - "template": { - "metadata": { - "labels": { - "app": "test-deployment" - }, - "annotations": { - "danm.io/interfaces": "[\n {\"tenantNetwork\":\"management\", \"ip\":\"dynamic\"},\n {\"clusterNetwork\":\"external\", \"ip\":\"dynamic\"},\n {\"tenantNetwork\":\"internal\", \"ip\":\"dynamic\"}\n]\n" - } - }, - "spec": { - "containers": [ - { - "name": "busybox", - "image": "busybox:latest", - "args": [ - "sleep", - "1000" - ] - } - ] - } - } - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "DANM", - "file_name": "11_allowed_default.yaml" - }, - "content": { - "apiVersion": "apps/v1", - "kind": "Deployment", - "metadata": { - "name": "test-deployment", - "namespace": "default" - }, - "spec": { - "selector": { - "matchLabels": { - "app": "test-deployment" - } - }, - "replicas": 1, - "template": { - "metadata": { - "labels": { - "app": "test-deployment" - } - }, - "spec": { - "containers": [ - { - "name": "busybox", - "image": "busybox:latest", - "args": [ - "sleep", - "1000" - ] - } - ] - } - } - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "DANM", - "file_name": "12_not_allowed_default.yaml" - }, - "content": { - "apiVersion": "apps/v1", - "kind": "Deployment", - "metadata": { - "name": "test-deployment", - "namespace": "kube-system" - }, - "spec": { - "selector": { - "matchLabels": { - "app": "test-deployment" - } - }, - "replicas": 1, - "template": { - "metadata": { - "labels": { - "app": "test-deployment" - } - }, - "spec": { - "containers": [ - { - "name": "busybox", - "image": "busybox:latest", - "args": [ - "sleep", - "1000" - ] - } - ] - } - } - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "DANM", - "file_name": "1_good_tconf.yaml" - }, - "content": { - "apiVersion": "danm.io/v1", - "kind": "TenantConfig", - "metadata": { - "name": "tconf" - }, - "hostDevices": [ - { - "name": "ens4", - "vniType": "vlan", - "vniRange": "1000-2000" - }, - { - "name": "ens5", - "vniType": "vlan", - "vniRange": "2000-3000" - } - ], - "networkIds": { - "flannel": "flannel" - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "DANM", - "file_name": "2_tnet_with_vlan.yaml" - }, - "content": { - "apiVersion": "danm.io/v1", - "kind": "TenantNetwork", - "metadata": { - "name": "internal", - "namespace": "default" - }, - "spec": { - "NetworkID": "internal", - "NetworkType": "ipvlan", - "Options": { - "host_device": "ens4", - "container_prefix": "int", - "rt_tables": 200, - "vlan": 700, - "cidr": "10.240.1.0/24", - "allocation_pool": { - "start": "10.240.1.100", - "end": "10.240.1.200" - } - } - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "DANM", - "file_name": "3_chosen_device.yaml" - }, - "content": { - "apiVersion": "danm.io/v1", - "kind": "TenantNetwork", - "metadata": { - "name": "internal", - "namespace": "default" - }, - "spec": { - "NetworkID": "internal", - "NetworkType": "ipvlan", - "Options": { - "host_device": "ens4", - "container_prefix": "int", - "rt_tables": 200, - "cidr": "10.240.1.0/24", - "allocation_pool": { - "start": "10.240.1.100", - "end": "10.240.1.200" - } - } - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "DANM", - "file_name": "4_random_device.yaml" - }, - "content": { - "apiVersion": "danm.io/v1", - "kind": "TenantNetwork", - "metadata": { - "name": "internal2", - "namespace": "default" - }, - "spec": { - "NetworkID": "internal2", - "NetworkType": "ipvlan", - "Options": { - "container_prefix": "int2", - "rt_tables": 200, - "cidr": "10.250.1.0/24", - "allocation_pool": { - "start": "10.250.1.100", - "end": "10.250.1.200" - } - } - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "DANM", - "file_name": "5_wrong_device.yaml" - }, - "content": { - "apiVersion": "danm.io/v1", - "kind": "TenantNetwork", - "metadata": { - "name": "internal3", - "namespace": "default" - }, - "spec": { - "NetworkID": "internal3", - "NetworkType": "ipvlan", - "Options": { - "host_device": "ens6", - "container_prefix": "int", - "rt_tables": 200, - "cidr": "10.251.1.0/24", - "allocation_pool": { - "start": "10.251.1.100", - "end": "10.251.1.200" - } - } - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "DANM", - "file_name": "6_static_tnet.yaml" - }, - "content": { - "apiVersion": "danm.io/v1", - "kind": "TenantNetwork", - "metadata": { - "name": "management", - "namespace": "default" - }, - "spec": { - "NetworkID": "iknowitbetter", - "NetworkType": "flannel" - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "DANM", - "file_name": "7_default_cnet.yaml" - }, - "content": { - "apiVersion": "danm.io/v1", - "kind": "ClusterNetwork", - "metadata": { - "name": "default" - }, - "spec": { - "NetworkID": "flannel", - "NetworkType": "flannel", - "AllowedTenants": [ - "default" - ] - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "DANM", - "file_name": "8_external_cnet.yaml" - }, - "content": { - "apiVersion": "danm.io/v1", - "kind": "ClusterNetwork", - "metadata": { - "name": "external" - }, - "spec": { - "NetworkID": "external", - "NetworkType": "ipvlan", - "Options": { - "host_device": "ens4", - "vlan": 500, - "container_prefix": "ext", - "rt_tables": 100, - "cidr": "10.100.1.0/24", - "allocation_pool": { - "start": "10.100.1.100", - "end": "10.100.1.200" - } - } - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "DANM", - "file_name": "9_wrong_deployment.yaml" - }, - "content": { - "apiVersion": "apps/v1", - "kind": "Deployment", - "metadata": { - "name": "test-deployment", - "namespace": "default" - }, - "spec": { - "selector": { - "matchLabels": { - "app": "test-deployment" - } - }, - "replicas": 1, - "template": { - "metadata": { - "labels": { - "app": "test-deployment" - }, - "annotations": { - "danm.io/interfaces": "[\n {\"tenantNetwork\":\"management\", \"clusterNetwork\":\"external\", \"ip\":\"dynamic\"}\n]\n" - } - }, - "spec": { - "containers": [ - { - "name": "busybox", - "image": "busybox:latest", - "args": [ - "sleep", - "1000" - ] - } - ] - } - } - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "DANM", - "file_name": "ClusterNetwork.yaml" - }, - "content": { - "apiVersion": "danm.io/v1", - "kind": "ClusterNetwork", - "metadata": { - "name": null - }, - "spec": { - "NetworkID": null, - "NetworkType": null, - "AllowedTenants": null, - "Options": { - "host_device": null, - "device_pool": null, - "cidr": null, - "allocation_pool": { - "start": null, - "end": null - }, - "net6": null, - "allocation_pool_v6": { - "cidr": null, - "start": null, - "end": null - }, - "container_prefix": null, - "rt_tables": null, - "routes": null, - "routes6": null, - "vxlan": null, - "vlan": null - } - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "DANM", - "file_name": "cnet_with_route.yaml" - }, - "content": { - "apiVersion": "danm.io/v1", - "kind": "ClusterNetwork", - "metadata": { - "name": "network-with-route" - }, - "spec": { - "NetworkID": "routed-net", - "NetworkType": "ipvlan", - "Options": { - "host_device": "bond0", - "cidr": "10.0.0.0/24", - "allocation_pool": { - "start": "10.0.0.1", - "end": "10.0.0.10" - }, - "container_prefix": "eth0", - "rt_tables": 10, - "routes": { - "10.0.1.0/24": "10.0.0.65" - } - } - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "DANM", - "file_name": "danm-installer-config.yaml" - }, - "content": { - "apiVersion": "v1", - "kind": "ConfigMap", - "metadata": { - "namespace": "kube-system", - "name": "danm-installer-config" - }, - "data": { - "deploy_mode": "production", - "cni_dir": "/etc/cni/net.d", - "cni_naming_scheme": "", - "default_cni_type": "flannel", - "default_cni_network_id": "10-flannel", - "image_pull_policy": "IfNotPresent" - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "DANM", - "file_name": "danm-installer.yaml" - }, - "content": { - "apiVersion": "batch/v1", - "kind": "Job", - "metadata": { - "name": "danm-installer", - "namespace": "kube-system" - }, - "spec": { - "template": { - "spec": { - "serviceAccountName": "danm-installer", - "containers": [ - { - "name": "danm-installer", - "volumeMounts": [ - { - "name": "danm-installer-config", - "mountPath": "/config" - } - ], - "image": "danm-installer:latest", - "imagePullPolicy": "IfNotPresent" - } - ], - "volumes": [ - { - "name": "danm-installer-config", - "configMap": { - "name": "danm-installer-config" - } - } - ], - "terminationGracePeriodSeconds": 0, - "restartPolicy": "OnFailure" - } - } - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "DANM", - "file_name": "DanmEp.yaml" - }, - "content": { - "apiVersion": "apiextensions.k8s.io/v1", - "kind": "CustomResourceDefinition", - "metadata": { - "name": "danmeps.danm.io" - }, - "spec": { - "group": "danm.io", - "names": { - "kind": "DanmEp", - "listKind": "DanmEpList", - "plural": "danmeps", - "singular": "danmep", - "shortNames": [ - "de", - "dep" - ] - }, - "scope": "Namespaced", - "versions": [ - { - "name": "v1", - "schema": { - "openAPIV3Schema": { - "properties": { - "apiVersion": { - "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - "type": "string" - }, - "kind": { - "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "type": "object" - }, - "spec": { - "properties": { - "CID": { - "type": "string" - }, - "EndpointID": { - "type": "string" - }, - "Host": { - "type": "string" - }, - "Interface": { - "properties": { - "Address": { - "type": "string" - }, - "AddressIPv6": { - "type": "string" - }, - "DeviceID": { - "type": "string" - }, - "MacAddress": { - "type": "string" - }, - "Name": { - "type": "string" - }, - "proutes": { - "additionalProperties": { - "type": "string" - }, - "type": "object" - }, - "proutes6": { - "additionalProperties": { - "type": "string" - }, - "type": "object" - } - }, - "type": "object" - }, - "NetworkName": { - "type": "string" - }, - "NetworkType": { - "type": "string" - }, - "Pod": { - "type": "string" - }, - "PodUID": { - "description": "UID is a type that holds unique ID values, including UUIDs. Because we don't ONLY use UUIDs, this is an alias to string. Being a type captures intent and helps make sure that UIDs and names do not get conflated.", - "type": "string" - }, - "apiType": { - "type": "string" - }, - "netns": { - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - } - }, - "served": true, - "storage": true - } - ] - }, - "status": { - "acceptedNames": { - "kind": "", - "plural": "" - }, - "conditions": [], - "storedVersions": [] - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "DANM", - "file_name": "DanmNet.yaml" - }, - "content": { - "apiVersion": "danm.io/v1", - "kind": "DanmNet", - "metadata": { - "name": null, - "namespace": null - }, - "spec": { - "NetworkID": null, - "NetworkType": null, - "Options": { - "host_device": null, - "device_pool": null, - "cidr": null, - "allocation_pool": { - "start": null, - "end": null - }, - "net6": null, - "allocation_pool_v6": { - "cidr": null, - "start": null, - "end": null - }, - "container_prefix": null, - "rt_tables": null, - "routes": null, - "routes6": null, - "vxlan": null, - "vlan": null - } - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "DANM", - "file_name": "DanmService.yaml" - }, - "content": { - "kind": "Service", - "apiVersion": "v1", - "metadata": { - "name": null, - "namespace": null, - "annotations": { - "danm.io/selector": null, - "danm.io/network": null, - "danm.io/tenantNetwork": null, - "danm.io/clusterNetwork": null - } - }, - "spec": { - "type": null, - "clusterIP": null, - "externalName": null, - "ports": [ - { - "protocol": null, - "port": null - } - ] - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "DANM", - "file_name": "danm_rbac.yaml" - }, - "content": { - "apiVersion": "rbac.authorization.k8s.io/v1", - "kind": "ClusterRole", - "metadata": { - "name": "caas:danm" - }, - "rules": [ - { - "apiGroups": [ - "danm.io" - ], - "resources": [ - "danmnets", - "danmeps", - "tenantnetworks", - "clusternetworks" - ], - "verbs": [ - "*" - ] - }, - { - "apiGroups": [ - "" - ], - "resources": [ - "pods" - ], - "verbs": [ - "get", - "watch", - "list" - ] - } - ] - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "DANM", - "file_name": "danm_rbac.yaml" - }, - "content": { - "apiVersion": "rbac.authorization.k8s.io/v1", - "kind": "ClusterRoleBinding", - "metadata": { - "name": "caas:danm" - }, - "roleRef": { - "apiGroup": "rbac.authorization.k8s.io", - "kind": "ClusterRole", - "name": "caas:danm" - }, - "subjects": [ - { - "kind": "ServiceAccount", - "namespace": "kube-system", - "name": "danm" - } - ] - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "DANM", - "file_name": "example_kubeconfig.yaml" - }, - "content": { - "apiVersion": "v1", - "kind": "Config", - "current-context": "default", - "clusters": [ - { - "cluster": { - "certificate-authority-data": "${CLUSTER_CA_CERTIFICATE}", - "server": "${CLUSTER_SERVER}" - }, - "name": "${CLUSTER_NAME}" - } - ], - "contexts": [ - { - "context": { - "cluster": "${CLUSTER_NAME}", - "user": "danm" - }, - "name": "default" - } - ], - "users": [ - { - "name": "danm", - "user": { - "token": "${SERVICEACCOUNT_TOKEN}" - } - } - ], - "preferences": {} - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "DANM", - "file_name": "example_vnf_ns.yaml" - }, - "content": { - "kind": "Namespace", - "apiVersion": "v1", - "metadata": { - "name": "example-vnf", - "labels": { - "name": "example-vnf" - } - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "DANM", - "file_name": "external_client.yaml" - }, - "content": { - "apiVersion": "apps/v1", - "kind": "Deployment", - "metadata": { - "name": "external-client", - "namespace": "external-client" - }, - "spec": { - "selector": { - "matchLabels": { - "app": "external-client" - } - }, - "replicas": 1, - "template": { - "metadata": { - "labels": { - "app": "external-client" - }, - "annotations": { - "danm.io/interfaces": "[\n {\"network\":\"external\", \"ip\":\"dynamic\"}\n]\n" - } - }, - "spec": { - "containers": [ - { - "name": "busybox", - "imagePullPolicy": "IfNotPresent", - "image": "busybox:latest", - "args": [ - "sleep", - "1000" - ] - } - ] - } - } - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "DANM", - "file_name": "external_client_ns.yaml" - }, - "content": { - "kind": "Namespace", - "apiVersion": "v1", - "metadata": { - "name": "external-client", - "labels": { - "name": "external-client" - } - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "DANM", - "file_name": "external_net.yaml" - }, - "content": { - "apiVersion": "danm.io/v1", - "kind": "DanmNet", - "metadata": { - "name": "external", - "namespace": "external-client" - }, - "spec": { - "NetworkID": "external", - "NetworkType": "ipvlan", - "Options": { - "host_device": "ens4", - "container_prefix": "eth0", - "rt_tables": 300, - "vlan": 300, - "cidr": "10.100.20.0/24", - "allocation_pool": { - "start": "10.100.20.50", - "end": "10.100.20.60" - } - } - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "DANM", - "file_name": "flannel.yaml" - }, - "content": { - "apiVersion": "danm.io/v1", - "kind": "TenantNetwork", - "metadata": { - "name": "flannel", - "namespace": "kube-system" - }, - "spec": { - "NetworkID": "flannel", - "NetworkType": "flannel" - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "DANM", - "file_name": "internal_lb_svc.yaml" - }, - "content": { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "name": "vnf-internal-lb", - "namespace": "example-vnf", - "annotations": { - "danm.io/selector": "{\"app\":\"loadbalancer\"}", - "danm.io/network": "internal" - } - }, - "spec": { - "clusterIP": "None", - "ports": [ - { - "name": "zeromq", - "port": 5555, - "protocol": "TCP" - } - ] - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "DANM", - "file_name": "internal_processor.yaml" - }, - "content": { - "apiVersion": "apps/v1", - "kind": "Deployment", - "metadata": { - "name": "internal-processor", - "namespace": "example-vnf" - }, - "spec": { - "selector": { - "matchLabels": { - "app": "internal-processor" - } - }, - "replicas": 6, - "template": { - "metadata": { - "labels": { - "app": "internal-processor" - }, - "annotations": { - "danm.io/interfaces": "[\n {\"network\":\"management\", \"ip\":\"dynamic\"},\n {\"network\":\"internal\", \"ip\":\"dynamic\"}\n]\n" - } - }, - "spec": { - "containers": [ - { - "name": "busybox", - "imagePullPolicy": "IfNotPresent", - "image": "busybox:latest", - "args": [ - "sleep", - "1000" - ] - } - ] - } - } - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "DANM", - "file_name": "internal_processor_svc.yaml" - }, - "content": { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "name": "vnf-internal-processor", - "namespace": "example-vnf", - "annotations": { - "danm.io/selector": "{\"app\":\"internal-processor\"}", - "danm.io/network": "internal" - } - }, - "spec": { - "clusterIP": "None", - "ports": [ - { - "name": "zeromq", - "port": 5555, - "protocol": "TCP" - } - ] - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "DANM", - "file_name": "loadbalancer.yaml" - }, - "content": { - "apiVersion": "apps/v1", - "kind": "Deployment", - "metadata": { - "name": "loadbalancer", - "namespace": "example-vnf" - }, - "spec": { - "selector": { - "matchLabels": { - "app": "loadbalancer" - } - }, - "replicas": 2, - "template": { - "metadata": { - "labels": { - "app": "loadbalancer", - "vnf-type": "example-vnf" - }, - "annotations": { - "danm.io/interfaces": "[\n {\"network\":\"management\", \"ip\":\"dynamic\"},\n {\"network\":\"external\", \"ip\":\"dynamic\"},\n {\"network\":\"internal\", \"ip\":\"dynamic\"}\n]\n" - } - }, - "spec": { - "containers": [ - { - "name": "busybox", - "imagePullPolicy": "IfNotPresent", - "image": "busybox:latest", - "args": [ - "sleep", - "1000" - ] - } - ] - } - } - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "DANM", - "file_name": "netwatcher_ds.yaml" - }, - "content": { - "apiVersion": "apps/v1", - "kind": "DaemonSet", - "metadata": { - "name": "netwatcher", - "namespace": "kube-system" - }, - "spec": { - "selector": { - "matchLabels": { - "danm.io": "netwatcher" - } - }, - "template": { - "metadata": { - "labels": { - "danm.io": "netwatcher" - } - }, - "spec": { - "serviceAccountName": "netwatcher", - "hostNetwork": true, - "dnsPolicy": "ClusterFirst", - "hostIPC": true, - "hostPID": true, - "containers": [ - { - "name": "netwatcher", - "image": "netwatcher", - "securityContext": { - "capabilities": { - "add": [ - "SYS_PTRACE", - "SYS_ADMIN", - "NET_ADMIN", - "NET_RAW" - ] - } - } - } - ], - "tolerations": [ - { - "effect": "NoSchedule", - "operator": "Exists" - }, - { - "effect": "NoExecute", - "operator": "Exists" - } - ], - "terminationGracePeriodSeconds": 0 - } - } - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "DANM", - "file_name": "pod_with_proutes.yaml" - }, - "content": { - "apiVersion": "apps/v1", - "kind": "Deployment", - "metadata": { - "name": "routed-deployment" - }, - "spec": { - "selector": { - "matchLabels": { - "app": "routed" - } - }, - "replicas": 1, - "template": { - "metadata": { - "labels": { - "app": "routed" - }, - "annotations": { - "danm.io/interfaces": "[\n {\"clusterNetwork\":\"network-with-route\", \"ip\":\"dynamic\", \"proutes\":{\"10.10.1.0/24\": \"10.0.0.65\"}}\n]\n" - } - }, - "spec": { - "containers": [ - { - "name": "busybox", - "imagePullPolicy": "IfNotPresent", - "image": "busybox:latest", - "args": [ - "sleep", - "1000" - ] - } - ] - } - } - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "DANM", - "file_name": "sriov_net.yaml" - }, - "content": { - "apiVersion": "danm.io/v1", - "kind": "DanmNet", - "metadata": { - "name": "management", - "namespace": "example-sriov" - }, - "spec": { - "NetworkID": "flannel", - "NetworkType": "flannel" - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "DANM", - "file_name": "sriov_net.yaml" - }, - "content": { - "apiVersion": "danm.io/v1", - "kind": "DanmNet", - "metadata": { - "name": "sriov-a", - "namespace": "example-sriov" - }, - "spec": { - "NetworkID": "sriov-a", - "NetworkType": "sriov", - "Options": { - "device_pool": "nokia.k8s.io/sriov_ens1f0", - "container_prefix": "first_path", - "rt_tables": 250, - "vlan": 250, - "cidr": "10.100.20.0/24", - "allocation_pool": { - "start": "10.100.20.10", - "end": "10.100.20.30" - } - } - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "DANM", - "file_name": "sriov_net.yaml" - }, - "content": { - "apiVersion": "danm.io/v1", - "kind": "DanmNet", - "metadata": { - "name": "sriov-b", - "namespace": "example-sriov" - }, - "spec": { - "NetworkID": "sriov-b", - "NetworkType": "sriov", - "Options": { - "device_pool": "nokia.k8s.io/sriov_ens1f1", - "container_prefix": "second_path", - "rt_tables": 251, - "vlan": 251, - "cidr": "10.200.20.0/24", - "allocation_pool": { - "start": "10.200.20.10", - "end": "10.200.20.30" - } - } - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "DANM", - "file_name": "sriov_ns.yaml" - }, - "content": { - "kind": "Namespace", - "apiVersion": "v1", - "metadata": { - "name": "example-sriov", - "labels": { - "name": "example-sriov" - } - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "DANM", - "file_name": "sriov_pod.yaml" - }, - "content": { - "apiVersion": "v1", - "kind": "Pod", - "metadata": { - "name": "sriov-pod", - "namespace": "example-sriov", - "labels": { - "env": "test" - }, - "annotations": { - "danm.io/interfaces": "[\n {\"network\":\"management\", \"ip\":\"dynamic\"},\n {\"network\":\"sriov-a\", \"ip\":\"none\"},\n {\"network\":\"sriov-b\", \"ip\":\"none\"}\n]\n" - } - }, - "spec": { - "containers": [ - { - "name": "sriov-pod", - "image": "busybox:latest", - "imagePullPolicy": "IfNotPresent", - "args": [ - "sleep", - "1000" - ], - "resources": { - "requests": { - "nokia.k8s.io/sriov_ens1f0": "1", - "nokia.k8s.io/sriov_ens1f1": "1" - }, - "limits": { - "nokia.k8s.io/sriov_ens1f0": "1", - "nokia.k8s.io/sriov_ens1f1": "1" - } - } - } - ] - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "DANM", - "file_name": "svcwatcher_ds.yaml" - }, - "content": { - "apiVersion": "apps/v1", - "kind": "DaemonSet", - "metadata": { - "name": "svcwatcher", - "namespace": "kube-system" - }, - "spec": { - "selector": { - "matchLabels": { - "danm.io": "svcwatcher" - } - }, - "template": { - "metadata": { - "annotations": { - "danm.io/interfaces": "[\n {\n \"network\":\"flannel\"\n }\n]\n" - }, - "labels": { - "danm.io": "svcwatcher" - } - }, - "spec": { - "serviceAccountName": "svcwatcher", - "dnsPolicy": "ClusterFirst", - "nodeSelector": { - "node-role.kubernetes.io/master": "" - }, - "containers": [ - { - "name": "svcwatcher", - "image": "svcwatcher", - "imagePullPolicy": "IfNotPresent", - "args": [ - "--logtostderr" - ] - } - ], - "tolerations": [ - { - "effect": "NoSchedule", - "operator": "Exists" - }, - { - "effect": "NoExecute", - "operator": "Exists" - } - ], - "terminationGracePeriodSeconds": 0 - } - } - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "DANM", - "file_name": "TenantConfig.yaml" - }, - "content": { - "apiVersion": "danm.io/v1", - "kind": "TenantConfig", - "metadata": { - "name": null - }, - "hostDevices": [ - { - "name": null, - "vniType": null, - "vniRange": null - } - ], - "networkIds": null - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "DANM", - "file_name": "TenantNetwork.yaml" - }, - "content": { - "apiVersion": "danm.io/v1", - "kind": "TenantNetwork", - "metadata": { - "name": null, - "namespace": null - }, - "spec": { - "NetworkID": null, - "NetworkType": null, - "Options": { - "host_device": null, - "device_pool": null, - "cidr": null, - "allocation_pool": { - "start": null, - "end": null - }, - "net6": null, - "allocation_pool_v6": { - "cidr": null, - "start": null, - "end": null - }, - "container_prefix": null, - "rt_tables": null, - "routes": null, - "routes6": null - } - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "DANM", - "file_name": "vnf_external_net.yaml" - }, - "content": { - "apiVersion": "danm.io/v1", - "kind": "DanmNet", - "metadata": { - "name": "external", - "namespace": "example-vnf" - }, - "spec": { - "NetworkID": "external", - "NetworkType": "ipvlan", - "Options": { - "host_device": "ens4", - "container_prefix": "ext", - "rt_tables": 250, - "vlan": 300, - "cidr": "10.100.20.0/24", - "allocation_pool": { - "start": "10.100.20.10", - "end": "10.100.20.30" - } - } - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "DANM", - "file_name": "vnf_external_svc.yaml" - }, - "content": { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "name": "vnf-external-svc", - "namespace": "example-vnf", - "annotations": { - "danm.io/selector": "{\"vnf-type\":\"example-vnf\"}", - "danm.io/network": "external" - } - }, - "spec": { - "clusterIP": "None", - "ports": [ - { - "name": "diameter", - "port": 3868, - "protocol": "TCP" - } - ] - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "DANM", - "file_name": "vnf_internal_net.yaml" - }, - "content": { - "apiVersion": "danm.io/v1", - "kind": "DanmNet", - "metadata": { - "name": "internal", - "namespace": "example-vnf" - }, - "spec": { - "NetworkID": "internal", - "NetworkType": "ipvlan", - "Options": { - "host_device": "ens3", - "container_prefix": "int", - "rt_tables": 200, - "vxlan": 600, - "cidr": "10.240.1.0/24", - "allocation_pool": { - "start": "10.240.1.100", - "end": "10.240.1.200" - } - } - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "DANM", - "file_name": "vnf_management_net.yaml" - }, - "content": { - "apiVersion": "danm.io/v1", - "kind": "DanmNet", - "metadata": { - "name": "management", - "namespace": "example-vnf" - }, - "spec": { - "NetworkID": "management", - "NetworkType": "flannel" - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "DANM", - "file_name": "webhook.yaml" - }, - "content": { - "apiVersion": "v1", - "kind": "ServiceAccount", - "metadata": { - "name": "danm-webhook", - "namespace": "kube-system" - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "DANM", - "file_name": "webhook.yaml" - }, - "content": { - "apiVersion": "rbac.authorization.k8s.io/v1", - "kind": "ClusterRole", - "metadata": { - "name": "caas:danm-webhook" - }, - "rules": [ - { - "apiGroups": [ - "danm.io" - ], - "resources": [ - "tenantconfigs", - "danmeps" - ], - "verbs": [ - "*" - ] - } - ] - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "DANM", - "file_name": "webhook.yaml" - }, - "content": { - "apiVersion": "rbac.authorization.k8s.io/v1", - "kind": "ClusterRoleBinding", - "metadata": { - "name": "caas:danm-webhook" - }, - "roleRef": { - "apiGroup": "rbac.authorization.k8s.io", - "kind": "ClusterRole", - "name": "caas:danm-webhook" - }, - "subjects": [ - { - "kind": "ServiceAccount", - "name": "danm-webhook", - "namespace": "kube-system" - } - ] - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "DANM", - "file_name": "webhook.yaml" - }, - "content": { - "apiVersion": "admissionregistration.k8s.io/v1beta1", - "kind": "MutatingWebhookConfiguration", - "metadata": { - "name": "danm-webhook-config", - "namespace": "kube-system" - }, - "webhooks": [ - { - "name": "danm-netvalidation.nokia.k8s.io", - "clientConfig": { - "service": { - "name": "danm-webhook-svc", - "namespace": "kube-system", - "path": "/netvalidation" - }, - "caBundle": "${CA_BUNDLE}" - }, - "rules": [ - { - "operations": [ - "CREATE" - ], - "apiGroups": [ - "danm.io" - ], - "apiVersions": [ - "v1" - ], - "resources": [ - "danmnets", - "clusternetworks", - "tenantnetworks" - ] - } - ], - "failurePolicy": "Fail", - "timeoutSeconds": 25 - }, - { - "name": "danm-configvalidation.nokia.k8s.io", - "clientConfig": { - "service": { - "name": "danm-webhook-svc", - "namespace": "kube-system", - "path": "/confvalidation" - }, - "caBundle": "${CA_BUNDLE}" - }, - "rules": [ - { - "operations": [ - "CREATE", - "UPDATE" - ], - "apiGroups": [ - "danm.io" - ], - "apiVersions": [ - "v1" - ], - "resources": [ - "tenantconfigs" - ] - } - ], - "failurePolicy": "Fail", - "timeoutSeconds": 25 - }, - { - "name": "danm-netdeletion.nokia.k8s.io", - "clientConfig": { - "service": { - "name": "danm-webhook-svc", - "namespace": "kube-system", - "path": "/netdeletion" - }, - "caBundle": "${CA_BUNDLE}" - }, - "rules": [ - { - "operations": [ - "DELETE" - ], - "apiGroups": [ - "danm.io" - ], - "apiVersions": [ - "v1" - ], - "resources": [ - "danmnets", - "clusternetworks", - "tenantnetworks" - ] - } - ], - "failurePolicy": "Fail", - "timeoutSeconds": 25 - } - ] - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "DANM", - "file_name": "webhook.yaml" - }, - "content": { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "name": "danm-webhook-svc", - "namespace": "kube-system", - "labels": { - "danm": "webhook" - } - }, - "spec": { - "ports": [ - { - "name": "webhook", - "port": 443, - "targetPort": 8443 - } - ], - "selector": { - "danm": "webhook" - } - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "DANM", - "file_name": "webhook.yaml" - }, - "content": { - "apiVersion": "apps/v1", - "kind": "Deployment", - "metadata": { - "name": "danm-webhook-deployment", - "namespace": "kube-system", - "labels": { - "danm": "webhook" - } - }, - "spec": { - "selector": { - "matchLabels": { - "danm": "webhook" - } - }, - "template": { - "metadata": { - "annotations": { - "danm.io/interfaces": "[\n {\n \"network\":\"flannel\"\n }\n]\n" - }, - "name": "danm-webhook", - "labels": { - "danm": "webhook" - } - }, - "spec": { - "serviceAccountName": "danm-webhook", - "containers": [ - { - "name": "danm-webhook", - "image": "webhook", - "command": [ - "/usr/local/bin/webhook", - "-tls-cert-bundle=/etc/webhook/certs/cert.pem", - "-tls-private-key-file=/etc/webhook/certs/key.pem", - "bind-port=8443" - ], - "imagePullPolicy": "IfNotPresent", - "volumeMounts": [ - { - "name": "webhook-certs", - "mountPath": "/etc/webhook/certs", - "readOnly": true - } - ] - } - ], - "volumes": [ - { - "name": "webhook-certs", - "secret": { - "secretName": "danm-webhook-certs" - } - } - ] - } - } - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "FabEdge", - "file_name": "cloud-agent.yaml" - }, - "content": { - "apiVersion": "apps/v1", - "kind": "DaemonSet", - "metadata": { - "name": "fabedge-cloud-agent", - "namespace": "fabedge" - }, - "spec": { - "selector": { - "matchLabels": { - "app": "fabedge-cloud-agent" - } - }, - "template": { - "metadata": { - "labels": { - "app": "fabedge-cloud-agent" - } - }, - "spec": { - "affinity": { - "nodeAffinity": { - "requiredDuringSchedulingIgnoredDuringExecution": { - "nodeSelectorTerms": [ - { - "matchExpressions": [ - { - "key": "node-role.kubernetes.io/edge", - "operator": "DoesNotExist" - }, - { - "key": "node-role.kubernetes.io/connector", - "operator": "DoesNotExist" - } - ] - } - ] - } - } - }, - "containers": [ - { - "args": [ - "--connector-node-addresses=10.20.8.12", - "--component=cloud-agent", - "-v=5" - ], - "image": "fabedge/cloud-agent", - "imagePullPolicy": "IfNotPresent", - "name": "fabedge-cloud-agent", - "resources": { - "limits": { - "cpu": "100m", - "memory": "64M" - }, - "requests": { - "cpu": "100m", - "memory": "64M" - } - }, - "securityContext": { - "privileged": true - } - } - ], - "hostNetwork": true - } - } - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "FabEdge", - "file_name": "codeql-analysis.yml" - }, - "content": { - "name": "CodeQL", - "true": { - "pull_request": { - "paths": [ - "**.go", - "go.mod", - "go.sum" - ] - } - }, - "jobs": { - "analyze": { - "name": "Analyze", - "runs-on": "ubuntu-latest", - "permissions": { - "actions": "read", - "contents": "read", - "security-events": "write" - }, - "steps": [ - { - "name": "Checkout repository", - "uses": "actions/checkout@v4" - }, - { - "name": "Initialize CodeQL", - "uses": "github/codeql-action/init@v2", - "with": { - "languages": "go" - } - }, - { - "name": "Autobuild", - "uses": "github/codeql-action/autobuild@v2" - }, - { - "name": "Perform CodeQL Analysis", - "uses": "github/codeql-action/analyze@v2" - } - ] - } - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "FabEdge", - "file_name": "communities.yaml" - }, - "content": { - "apiVersion": "fabedge.io/v1alpha1", - "kind": "Community", - "metadata": { - "name": "all-edges" - }, - "spec": { - "members": [ - "beijing.edge1", - "beijing.edge2" - ] - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "FabEdge", - "file_name": "communities.yaml" - }, - "content": { - "apiVersion": "fabedge.io/v1alpha1", - "kind": "Community", - "metadata": { - "name": "all-clusters" - }, - "spec": { - "members": [ - "beijing.connector", - "hangzhou.connector", - "shenzhen.connector" - ] - } - } - }, - { - "tag": { - "category": "Runtime", - "subcategory": "Cloud Native Network", - "project_name": "FabEdge", - "file_name": "connector.yaml" - }, - "content": { - "apiVersion": "apps/v1", - "kind": "Deployment", - "metadata": { - "name": "fabedge-connector", - "namespace": "fabedge" - }, - "spec": { - "replicas": 1, - "selector": { - "matchLabels": { - "app": "fabedge-connector" - } - }, - "strategy": { - "type": "Recreate" - }, - "template": { - "metadata": { - "labels": { - "app": "fabedge-connector" - } - }, - "spec": { - "affinity": { - "nodeAffinity": { - "requiredDuringSchedulingIgnoredDuringExecution": { - "nodeSelectorTerms": [ - { - "matchExpressions": [ - { - "key": "node-role.kubernetes.io/connector", - "operator": "Exists" - } - ] - } - ] - } - }, - "podAntiAffinity": { - "requiredDuringSchedulingIgnoredDuringExecution": [ - { - "labelSelector": { - "matchExpressions": [ - { - "key": "app", - "operator": "In", - "values": [ - "fabedge-connector" - ] - } - ] - }, - "topologyKey": "kubernetes.io/hostname" - } - ] - } - }, - "hostNetwork": true, - "containers": [ - { - "name": "strongswan", - "image": "fabedge/strongswan", - "imagePullPolicy": "IfNotPresent", - "readinessProbe": { - "exec": { - "command": [ - "/usr/sbin/swanctl", - "--version" - ] - }, - "initialDelaySeconds": 15, - "periodSeconds": 10 - }, - "securityContext": { - "capabilities": { - "add": [ - "NET_ADMIN", - "SYS_MODULE" - ] - } - }, - "volumeMounts": [ - { - "name": "var-run", - "mountPath": "/var/run/" - }, - { - "name": "ipsec-d", - "mountPath": "/etc/ipsec.d/", - "readOnly": true - }, - { - "name": "ipsec-secrets", - "mountPath": "/etc/ipsec.secrets", - "subPath": "ipsec.secrets", - "readOnly": true - } - ] - }, - { - "name": "connector", - "securityContext": { - "capabilities": { - "add": [ - "NET_ADMIN" - ] - } - }, - "image": "fabedge/connector", - "imagePullPolicy": "IfNotPresent", - "args": [ - "--cni-type=calico", - "--sync-period=1m", - "--connector-node-addresses=10.20.8.28", - "--component=connector", - "-v=5" - ], - "volumeMounts": [ - { - "name": "var-run", - "mountPath": "/var/run/" - }, - { - "name": "connector-config", - "mountPath": "/etc/fabedge/" - }, - { - "name": "ipsec-d", - "mountPath": "/etc/ipsec.d/", - "readOnly": true - } - ] - } - ], - "volumes": [ - { - "name": "var-run", - "emptyDir": {} - }, - { - "name": "connector-config", - "configMap": { - "name": "connector-config" - } - }, - { - "name": "ipsec-d", - "secret": { - "items": [ - { - "key": "ca.crt", - "path": "cacerts/ca.crt" - }, - { - "key": "tls.crt", - "path": "certs/tls.crt" - }, - { - "key": "tls.key", - "path": "private/tls.key" - } - ], - "secretName": "connector-tls" - } - }, - { - "name": "ipsec-secrets", - "secret": { - "items": [ - { - "key": "ipsec.secrets", - "path": "ipsec.secrets" - } - ], - "secretName": "connector-tls" - } - } - ] - } - } - } - } - } - -] \ No newline at end of file