litmuschaos / admission-controllers

Admission Controllers used in LitmusChaos
Apache License 2.0
7 stars 6 forks source link

Add Validation support for Application Namespace specified in ChaosEngine #11

Closed rahulchheda closed 4 years ago

rahulchheda commented 4 years ago

FEATURE REQUEST

Tracking this here: https://github.com/litmuschaos/litmus/issues/2182

What happened:

What you expected to happen:

How to reproduce it (as minimally and precisely as possible):

Anything else we need to know?:

DarthBenro008 commented 4 years ago

Hey @rahulchheda I am new to the world of kubernetes, would like to give this a try!

rahulchheda commented 4 years ago

Sure, go ahead! @DarthBenro008

rahulchheda commented 4 years ago

Let me know if any details are missing here, would fill the issue up.

rahulchheda commented 4 years ago

Any updates on this @DarthBenro008 ?

DarthBenro008 commented 4 years ago

Hey @rahulchheda , was just taking some time going through the code and also had a few queries. By validation of namespace, does it mean to check existence of the namespace in the ChaosEngine? The appns param specified in the appinfo of YAML?

rahulchheda commented 4 years ago

So, the namespce for the ChaosEngine is validated by k8s itself, we need to validate the one specified in app params.

DarthBenro008 commented 4 years ago

Oh that's awesome. Just a confirmation, by validation its just checking the existence , right? or is there any norms (regex?) to be followed and validated? As mentioned earlier, pretty new to the world of Kubernetes. Thank you for your response!

rahulchheda commented 4 years ago

No, it just a simple GET request for the namespace, if no error, them go ahead, or else append the errors.

DarthBenro008 commented 4 years ago

That makes it clear. Will work on it and send a PR soon!

DarthBenro008 commented 4 years ago

@rahulchheda apologies for the delay, PR #23 closes this issue, please let me know if there are scope of further improvements.