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

[skeleton] workloads.lawrjone.xyz (Console) #9

Merged
merged 5 commits into from
Jan 18, 2019

Conversation

lawrencejones
Copy link
Contributor

@lawrencejones lawrencejones commented Jan 14, 2019

pkg/apis/workloads: Console (no codegen)

Create the definition of a Console, an instance of a console
environment. This is only the skeleton of what we'll have later, but is
designed to store the User field which we'll then prove can work with
mutating webhooks.

This commit does not update codegen, to make it clearer to reviewers
what has been done by a human and what is machine generated.

## make codegen: add workloads:v1alpha1

Following on from the previous commit that introduced the API
definitions for the workloads API group (and Console resource), this
updates our generated client to include the workloads resources.

Skeleton workloads controller and webhooks

Create the new workloads manager, along with skeleton controller and
webhook code. This version of the manager uses automatic creation of
webhooks in the cluster, and also manages the service that will point at
the statefulset. Ideally we'd only automatically update the webhook
configuration but the controller-runtime doesn't allow this: we'll
likely change this implementation in future.

pkg/workloads/console/integration

Create integration tests that verify console behaviour, both the webhook
and the controller together. This commit introduces a number of
integration test helpers that should be really useful for testing
admission webhooks, such as integration.NewServer and similar matchers
for test channels as with the reconcile loop.

@lawrencejones lawrencejones force-pushed the lawrence-rbac-creator branch 3 times, most recently from e60a811 to 275cd8a Compare January 14, 2019 11:00
@lawrencejones lawrencejones changed the title [WIP] workloads.lawrjone.xyz [WIP] workloads.lawrjone.xyz (Console) Jan 14, 2019
@lawrencejones lawrencejones force-pushed the lawrence-rbac-creator branch 2 times, most recently from 852be60 to 4c97380 Compare January 17, 2019 21:09
@lawrencejones lawrencejones force-pushed the lawrence-rbac-creator branch 2 times, most recently from 3491652 to 78f476e Compare January 17, 2019 21:25
Create the definition of a Console, an instance of a console
environment. This is only the skeleton of what we'll have later, but is
designed to store the User field which we'll then prove can work with
mutating webhooks.

This commit does not update codegen, to make it clearer to reviewers
what has been done by a human and what is machine generated.
Following on from the previous commit that introduced the API
definitions for the workloads API group (and Console resource), this
updates our generated client to include the workloads resources.
Create the new workloads manager, along with skeleton controller and
webhook code. This version of the manager uses automatic creation of
webhooks in the cluster, and also manages the service that will point at
the statefulset. Ideally we'd only automatically update the webhook
configuration but the controller-runtime doesn't allow this: we'll
likely change this implementation in future.
Create integration tests that verify console behaviour, both the webhook
and the controller together. This commit introduces a number of
integration test helpers that should be really useful for testing
admission webhooks, such as integration.NewServer and similar matchers
for test channels as with the reconcile loop.
@lawrencejones lawrencejones changed the title [WIP] workloads.lawrjone.xyz (Console) [skeleton] workloads.lawrjone.xyz (Console) Jan 18, 2019
@lawrencejones
Copy link
Contributor Author

I'm going to merge this so I can do some smaller cleanups with the code. The PR still serves as a good example of introducing concepts even when closed!

@lawrencejones lawrencejones merged commit 90616ae into master Jan 18, 2019
@lawrencejones lawrencejones deleted the lawrence-rbac-creator branch January 18, 2019 17:07
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.

1 participant