Skip to content
New issue

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

Add Challenge CRD as a Kubernetes API extension #106

Closed
gree-gorey opened this issue Jun 24, 2020 · 2 comments
Closed

Add Challenge CRD as a Kubernetes API extension #106

gree-gorey opened this issue Jun 24, 2020 · 2 comments
Assignees
Labels
p1 important ux user experience improvements
Milestone

Comments

@gree-gorey
Copy link
Collaborator

Background on k8s CRD: https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/

We can add challenge object with it's yaml config looking smth like:

apiVersion: "kctf.dev/v1"
kind: Challenge
metadata:
  name: mychal
spec:
  public: true
  healthcheck: false
  https: true
  dns: true
  autoscaling: {}
  # any other arbitrary fields

On the k8s cluster size there will be a controller (needs to be implemented): it will just watch for creation/update of challenge resource in the cluster, and set it up upon creation/update. E.g. if you change public: true to public: false it will delete service for that challenge.

Some advantages of having this:

  1. challenge will become a 1st-class k8s API citizen, allowing to use kubectl list challenges or kubectl describe challenge mychal
  2. it allows us to use standard config (k8s yaml) and standard commands like kubectl create challenge mychal or kubectl delete challenge mychal
  3. we can take away some steps from being executed locally to k8s controller, e.g. building an image for challenge: the controller would create a Job for building an image and then creates a Deployment for challenge
  4. this can also help with versioning: we can specify it with apiVersion: "kctf.dev/v1", this is again a standard way of k8s API versioning
@gree-gorey
Copy link
Collaborator Author

I am going to put together some minimal proof of concept to see if that would work and how difficult/convenient that would be.

@sirdarckcat sirdarckcat added p1 important ux user experience improvements labels Jul 10, 2020
@sirdarckcat sirdarckcat added this to the Beta Launch milestone Jul 10, 2020
@aliciafmachado
Copy link
Collaborator

I guess it's done :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p1 important ux user experience improvements
Projects
None yet
Development

No branches or pull requests

3 participants