-
Notifications
You must be signed in to change notification settings - Fork 882
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
feat(controller): don't hardcode experiment ports; always create service #2397
Conversation
Fixes: argoproj#2233 Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>
Create a service even though a weight is not set (when the name is provided) Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>
Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>
Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>
Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>
Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>
Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>
Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>
Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>
Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>
…periment-service-name
Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>
Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>
Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>
Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>
Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>
Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>
Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>
…service. update docs Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>
…ot nil Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>
006cb4f
to
fcbb31a
Compare
Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>
Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>
Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>
Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>
In regards to the e2e tests, can you confirm for me that if we modify the code to not create the service if there is no ports defined on the pod spec. I think that should fix all the e2e tests and not require a port on the container which I think we should support |
correct, I forgot about that. let me do this change |
Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
…ice (argoproj#2397) * Copy ports from replicaset rather than hardcoding them Fixes: argoproj#2233 Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com> * Allow user to set the experiment service name. Create a service even though a weight is not set (when the name is provided) Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com> * Run codegen Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com> * Run codegen again, service name is optional Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com> * Fix conversion and tests Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com> * Fix codegen Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com> * Fix codegen again Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com> * white space Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com> * Extend from corev1.ServiceSpec Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com> * make lint Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com> * infer ports from ReplicaSet. this should fix e2e tests Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com> * fix e2e disable service where service is not needed or expected set ports where service must be created Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com> * use json inline so that crd reflects ports Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com> * Add codegen openapi_generated.go Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com> * fix codegen, protobuf is needed Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com> * Add unit test Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com> * Add unit test to new not tested code - copy pods from RS Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com> * Address PR comment: set entire spec Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com> * docs: update experiment and rollout spec Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com> * redo pr. drop spec changes. only inherit ports and always create the service. update docs Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com> * Ran go fmt Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com> * revert changes. only enable service if weighted or template service not nil Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com> * typo in types Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com> * go fmt. need pre-commit hook Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com> * no more spec changes Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com> * drop test which is not relevant any more Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com> * fix e2e - only generate service if RS has ports Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com> * fix e2e Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com> Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>
…ice (argoproj#2397) * Copy ports from replicaset rather than hardcoding them Fixes: argoproj#2233 Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com> * Allow user to set the experiment service name. Create a service even though a weight is not set (when the name is provided) Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com> * Run codegen Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com> * Run codegen again, service name is optional Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com> * Fix conversion and tests Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com> * Fix codegen Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com> * Fix codegen again Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com> * white space Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com> * Extend from corev1.ServiceSpec Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com> * make lint Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com> * infer ports from ReplicaSet. this should fix e2e tests Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com> * fix e2e disable service where service is not needed or expected set ports where service must be created Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com> * use json inline so that crd reflects ports Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com> * Add codegen openapi_generated.go Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com> * fix codegen, protobuf is needed Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com> * Add unit test Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com> * Add unit test to new not tested code - copy pods from RS Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com> * Address PR comment: set entire spec Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com> * docs: update experiment and rollout spec Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com> * redo pr. drop spec changes. only inherit ports and always create the service. update docs Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com> * Ran go fmt Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com> * revert changes. only enable service if weighted or template service not nil Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com> * typo in types Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com> * go fmt. need pre-commit hook Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com> * no more spec changes Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com> * drop test which is not relevant any more Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com> * fix e2e - only generate service if RS has ports Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com> * fix e2e Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com> Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>
@@ -64,9 +64,7 @@ func GetExperimentFromTemplate(r *v1alpha1.Rollout, stableRS, newRS *appsv1.Repl | |||
Name: templateStep.Name, | |||
Replicas: templateStep.Replicas, | |||
} | |||
if templateStep.Weight != nil { |
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.
Feels like we can use weight: 0 to keep creating the service, if automated creation is rolled back
superseeds: #2357
fixes: #2233
also relates to: #2396
Checklist:
"fix(controller): Updates such and such. Fixes #1234"
.