Giter VIP home page Giter VIP logo

Comments (4)

tsandall avatar tsandall commented on May 23, 2024

@rtoma can you share the flags you started kube-mgmt with and the version of Kubernetes you're running against? I'm not able to reproduce this against Kubernetes v1.13 or v1.15.

{
  "result": {
    "kubernetes": {
      "namespaces": {
        "default": {
          "apiVersion": "v1",
          "kind": "Namespace",
          "metadata": {
            "creationTimestamp": "2019-10-02T12:44:16Z",
            "name": "default",
            "resourceVersion": "150",
            "selfLink": "/api/v1/namespaces/default",
            "uid": "3ed489d0-0648-4476-be9d-376a5c5298eb"
          },
          "spec": {
            "finalizers": [
              "kubernetes"
            ]
          },
          "status": {
            "phase": "Active"
          }
        },
        "kube-node-lease": {
          "apiVersion": "v1",
          "kind": "Namespace",
          "metadata": {
            "creationTimestamp": "2019-10-02T12:44:12Z",
            "name": "kube-node-lease",
            "resourceVersion": "8",
            "selfLink": "/api/v1/namespaces/kube-node-lease",
            "uid": "28f5d5f2-d739-43c9-8591-e754f925f494"
          },
          "spec": {
            "finalizers": [
              "kubernetes"
            ]
          },
          "status": {
            "phase": "Active"
          }
        },

kube-mgmt args:

      - name: kube-mgmt
        image: openpolicyagent/kube-mgmt:0.10
        args:
        - --replicate-cluster=v1/namespaces

from kube-mgmt.

rtoma avatar rtoma commented on May 23, 2024

I have tested openpolicyagent/kube-mgmt:0.10-rc1 (b38f0386cfc1) on v1.13.7-gke.24 with flags:

          - --replicate=v1/namespaces
          - --replicate=v1/pods
          - --replicate=extensions/v1beta1/ingresses

I see you used a different OPA REST endpoint. I used /v1/data/kubernetes/namespaces and not /v1/data.

from kube-mgmt.

tsandall avatar tsandall commented on May 23, 2024

Ah, interesting. Your args should be --replicate-cluster=v1/namespaces not --replicate=.... The --replicate-cluster flag tells kube-mgmt the resource is cluster scoped while the --replicate flag tells kube-mgmt the resource is namespace scoped. It seems the new version of kube-mgmt behaves slightly differently here. Nonetheless, you'll want to use --replicate-cluster. See https://github.com/open-policy-agent/kube-mgmt#caching

RE: the OPA REST endpoint, whether you can query at /data or /data/kubernetes/namespaces etc. doesn't matter in this case (the underlying data is the same.)

If you're able to test out v0.10 with the updated flag and let me know that would great (but I understand if you've got other things to do :D)

from kube-mgmt.

rtoma avatar rtoma commented on May 23, 2024

Verified with kube-mgmt:0.10 with --replicate-cluster=v1/namespaces and everything is fine. Closing.

from kube-mgmt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.