-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
remove pointers from types, add webhook validation for service #583
Conversation
/assign @evankanderson |
) | ||
|
||
// +genclient | ||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object | ||
|
||
// Service | ||
type Service struct { | ||
metav1.TypeMeta `jsonL",inline"` | ||
metav1.ObjectMeta `json:"metadata,omitempty"` | ||
metav1.TypeMeta `json",inline"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be json:",inline"
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
version: v1alpha1 | ||
names: | ||
kind: Service | ||
plural: services |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How does this affect kubectl get services
? Does it override the core Service resource?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't. You have to use the full name for the ela service:
$ kubectl get services
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
git-webhook-00001-autoscaler NodePort 10.11.247.70 <none> 8080:30112/TCP 13d
git-webhook-00001-service NodePort 10.11.240.64 <none> 80:30278/TCP 13d
git-webhook-service ClusterIP 10.11.251.209 <none> 80/TCP 13d
kubernetes ClusterIP 10.11.240.1 <none> 443/TCP 33d
vaikas@vaikas-linux3:~$ kubectl get services.elafros.dev
No resources found.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it, thanks!
Thanks, PTAL :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
t.Errorf("Expected success, but failed with: %s", err) | ||
} | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TestRunLatestWithMissingConfiguration?
Thanks, PTAL. test added. |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: evankanderson, grantr, vaikas-google The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
* remove pointers from types, add webhook validation for service * add service.yaml file so the CRD is created * remove errorneous go_library * fix typo * add a test for validating Service with missing RunLatest.Configuration fails
Addresses part of #412
Proposed Changes