We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mizar and Arktos communicates through gRPC protocol. The desired Network policy gRPC message should be:
message BuiltinsNetworkPolicyMessage { string name = 1; string tenant = 2; string namespace = 3; string spec = 4; }
https://github.com/clu2xlu/arktos/blob/poc/pkg/controller/mizar/builtins.proto#L75-L79
However, in go, the network policy obj's Spec is not in String format. e.g. policy.Spec cannot be converted to string directly. https://github.com/clu2xlu/arktos/blob/poc/pkg/controller/mizar/util.go#L125
For this task, you will need to use NetworkPolicySpec, Ingress and Egress to convert network policy's spec into a json string
The desired spec json strong looks like this:
{'podSelector': {'matchLabels': {'run': 'pod0'}}, 'ingress': [{'ports': [{'protocol': 'TCP', 'port': 8000}, {'protocol': 'TCP', 'port': 5976}], 'from': [{'podSelector': {'matchLabels': {'run': 'pod1'}}}]}], 'egress': [{'ports': [{'protocol': 'TCP', 'port': 8000}], 'to': [{'podSelector': {'matchLabels': {'run': 'pod2'}}}]}], 'policyTypes': ['Ingress', 'Egress']}
it's yaml is
apiVersion: networking.k8s.io/v1 kind: NetworkPolicy metadata: name: test-network-policy namespace: default spec: podSelector: matchLabels: run: pod0 policyTypes: - Ingress - Egress ingress: - from: - podSelector: matchLabels: run: pod1 ports: - protocol: TCP port: 8000 - protocol: TCP port: 5976 egress: - to: - podSelector: matchLabels: run: pod2 ports: - protocol: TCP port: 8000
NOTE: please use my branch for now:
For mizar: use branch poc https://github.com/clu2xlu/mizar/tree/poc
For arktos: use branch poc https://github.com/clu2xlu/arktos/tree/poc
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Mizar and Arktos communicates through gRPC protocol.
The desired Network policy gRPC message should be:
https://github.com/clu2xlu/arktos/blob/poc/pkg/controller/mizar/builtins.proto#L75-L79
However, in go, the network policy obj's Spec is not in String format. e.g. policy.Spec cannot be converted to string directly.
https://github.com/clu2xlu/arktos/blob/poc/pkg/controller/mizar/util.go#L125
For this task, you will need to use NetworkPolicySpec, Ingress and Egress to convert network policy's spec into a json string
The desired spec json strong looks like this:
it's yaml is
NOTE: please use my branch for now:
For mizar: use branch poc
https://github.com/clu2xlu/mizar/tree/poc
For arktos: use branch poc
https://github.com/clu2xlu/arktos/tree/poc
The text was updated successfully, but these errors were encountered: