Skip to content
This repository has been archived by the owner on Jul 25, 2022. It is now read-only.

improve/simplify validations #422

Open
tedteng opened this issue Oct 30, 2020 · 1 comment
Open

improve/simplify validations #422

tedteng opened this issue Oct 30, 2020 · 1 comment
Labels
kind/enhancement Enhancement, improvement, extension lifecycle/rotten Nobody worked on this for 12 months (final aging stage)

Comments

@tedteng
Copy link
Contributor

tedteng commented Oct 30, 2020

It's better now but I still think it's hard to understand and extend. I think these validations started simple but with added functionality started to get more and more complex. I do not have a concrete proposal now but I'm sure this can be expressed simpler. Maybe something to improve/simplify in a different PR

Originally posted by @petersutter in #404 (comment)

@tedteng
Copy link
Contributor Author

tedteng commented Oct 30, 2020

	if !IsTargeted(targetReader, "shoot") && (args[0] != "gardener-apiserver") && (args[0] != "gardener-controller-manager") && (args[0] != "tf") && (args[0] != "kubernetes-dashboard") {
		return errors.New("No shoot targeted")
	} else if !IsTargeted(targetReader, "seed") && (args[0] == "tf") || !IsTargeted(targetReader, "shoot") && (args[0] == "tf") {
		return errors.New("No seed or shoot targeted")
	} else if !IsTargeted(targetReader) {

@tedteng tedteng added the kind/enhancement Enhancement, improvement, extension label Oct 30, 2020
@gardener-robot gardener-robot added the lifecycle/stale Nobody worked on this for 6 months (will further age) label Sep 22, 2021
@gardener-robot gardener-robot added lifecycle/rotten Nobody worked on this for 12 months (final aging stage) and removed lifecycle/stale Nobody worked on this for 6 months (will further age) labels Mar 24, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/enhancement Enhancement, improvement, extension lifecycle/rotten Nobody worked on this for 12 months (final aging stage)
Projects
None yet
Development

No branches or pull requests

2 participants