Welcome to the Linux Foundation Forum!

Wrong Indentation for NetworkPolicy example

Options

Hello,

During the reading of the course I found that there is an issue with the indentation of the NetworkPolicy example (Security page 11) : the “egress” block should be at the same level as “ingress” block :

https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.19/#networkpolicyspec-v1-networking-k8s-io

https://trainingportal.linuxfoundation.org/learn/course/kubernetes-for-developers-lfd259/understanding-security/security?page=11

Best Regards,

Julien

Best Answer

Answers

  • Vampouille
    Options

    Thanks @fcioanca for this quick fix. But syntax it's still not valid : the following element have wrong indentation:

    • port
    • namespaceSelector
    • podSelector
      in the ingress section.
      There is also no dash in front of selectors. They are part of the NetworkPolicyPeer definition
  • Vampouille
    Options

    Hello @fcioanca, can you double check the indentation of the slide "Network Security Policy Example", it's still not valid.

  • fcioanca
    fcioanca Posts: 1,909
    Options

    Hi @Vampouille

    The indentation matches the current Kubernetes documentation.

    Thank you,
    Flavia

  • Vampouille
    Options

    Sorry but it's not the same indentation. I'm talking about the page "Security/Network Security Policy Example" with :

    for example, "ports" and "egress" are at the same level and this is not valid if you compare with the k8s doc :

  • fcioanca
    fcioanca Posts: 1,909
    Options

    This is the page in the live course, and it looks different than what you posted:

  • Vampouille
    Options

    @fcioanca Thanks for the screenshot, it explains why we don't understand each other ;-) This is not the same training. Your screenshot is from LFS258 (CKA) and mine is from LFS259 (CKAD). I did not notice that there is also a part regarding network policies in LFS258.

  • fcioanca
    fcioanca Posts: 1,909
    Options

    Hi @Vampouille , should be good now (I hope :) ).

  • Vampouille
    Options

    @fcioanca Perfect, thanks :-)

Categories

Upcoming Training