Skip to content

Conversation

@omerlh
Copy link
Contributor

@omerlh omerlh commented Feb 17, 2019

This is a very first MVP version of the CRD. Currently, only create and delete are supported.
In order to finish this task we need:

  • Documentation
  • Tests
  • Release a new docker image
  • Run the tests in the CI/CD + make sure all tests are passing
  • Test using multiple k8s versions
  • Add regression tests - encrypt data using the code on master and test it's decrypted succesfully.

Want to give it a try? You can build the images locally, and use crd.yaml and tls.yaml to test it out.

close #13

@omerlh
Copy link
Contributor Author

omerlh commented Mar 7, 2019

To test the CRD:

  • Clone the code, and make sure you have a cluster running (use kubectl get pods to check).
  • cd src/crd-controller
  • kubectl apply -f crd.yaml
  • Now run dotnet run and wait to see
[<time> INF] CRD controller started
  • Run kubectl apply -f tls.yaml from another terminal. This will create a CRD object. Now run kubectl get secrets and look for a secret named my-tls-secret. It's working!
  • Run kubectl delete -f tls.yaml to delete the CRD object. Notice that kubectl get secrets does not return a secret named my-tls-secret. It's working!

public Dictionary<string, string> Data { get; set; }
public string Type { get; set; }
public V1ObjectMeta Metadata { get; set; }
public string ServiceAccount { get; set; }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't that an issue where the property names are capitalized here and camel cased in the KamusSecret k8s object (in the docs)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It worked, I'm not 100% sure why 🤷‍♂️

<PackageReference Include="KubernetesClient" Version="1.5.1-g60ffd20a7c" />
<PackageReference Include="System.Net.Http" Version="4.3.3" />
<PackageReference Include="App.Metrics.AspNetCore.Mvc" Version="2.0.0" />
<PackageReference Include="App.Metrics.Formatters.Prometheus" Version="2.0.0" />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update both AppMetrics packages to version 3 for newest Prometheus support

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will!

Copy link
Contributor

@shaikatz shaikatz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow amazing job, that feature will open cool use cases for kamus, storing native k8s secrets but in a GitOps way!

Oh, left some small comments.

@omerlh
Copy link
Contributor Author

omerlh commented Apr 4, 2019

Cool, thanks! Just left to fight the build :)

shaikatz
shaikatz previously approved these changes Apr 4, 2019
Copy link
Contributor

@shaikatz shaikatz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🤞

@omerlh omerlh merged commit ae090f8 into master Apr 11, 2019
@omerlh omerlh changed the title [WIP] Added CRD controller Added CRD controller Apr 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add CRD to create secrets wrapper

3 participants