Skip to content

Commit 4abc60a

Browse files
committed
removal of selfhosted params/options
1 parent 09c6c31 commit 4abc60a

File tree

3 files changed

+135
-21
lines changed

3 files changed

+135
-21
lines changed

cmd/app/options.go

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,6 @@ const (
4141

4242
envQuayToken = "QUAY_TOKEN" // #nosec G101
4343

44-
envSelfhostedPrefix = "SELFHOSTED"
45-
envSelfhostedUsername = "USERNAME"
46-
envSelfhostedPassword = "PASSWORD"
47-
envSelfhostedHost = "HOST"
48-
envSelfhostedBearer = "TOKEN" // #nosec G101
49-
envSelfhostedTokenPath = "TOKEN_PATH"
50-
envSelfhostedInsecure = "INSECURE"
51-
envSelfhostedCAPath = "CA_PATH"
52-
5344
// Used for kubernetes Credential Discovery
5445
envKeychainServiceAccountName = "AUTH_SERVICE_ACCOUNT_NAME"
5546
envKeychainNamespace = "AUTH_SERVICE_ACCOUNT_NAMESPACE"
@@ -59,16 +50,6 @@ const (
5950
envKeychainRefreshDuration = "AUTH_REFRESH_DURATION"
6051
)
6152

62-
var (
63-
selfhostedHostReg = regexp.MustCompile("^VERSION_CHECKER_SELFHOSTED_HOST_(.*)")
64-
selfhostedUsernameReg = regexp.MustCompile("^VERSION_CHECKER_SELFHOSTED_USERNAME_(.*)")
65-
selfhostedPasswordReg = regexp.MustCompile("^VERSION_CHECKER_SELFHOSTED_PASSWORD_(.*)")
66-
selfhostedTokenPath = regexp.MustCompile("^VERSION_CHECKER_SELFHOSTED_TOKEN_PATH_(.*)")
67-
selfhostedTokenReg = regexp.MustCompile("^VERSION_CHECKER_SELFHOSTED_TOKEN_(.*)")
68-
selfhostedCAPath = regexp.MustCompile("^VERSION_CHECKER_SELFHOSTED_CA_PATH_(.*)")
69-
selfhostedInsecureReg = regexp.MustCompile("^VERSION_CHECKER_SELFHOSTED_INSECURE_(.*)")
70-
)
71-
7253
// Options is a struct to hold options for the version-checker.
7354
type Options struct {
7455
MetricsServingAddress string
@@ -84,8 +65,7 @@ type Options struct {
8465

8566
kubeConfigFlags *genericclioptions.ConfigFlags
8667

87-
selfhosted selfhosted.Options
88-
Client client.Options
68+
Client client.Options
8969
}
9070

9171
type envMatcher struct {
@@ -358,6 +338,7 @@ func (o *Options) addAuthFlags(fs *pflag.FlagSet) {
358338
"THIS IS NOT RECOMMENDED AND IS INTENDED FOR DEBUGGING (%s_%s_%s)",
359339
envPrefix, envSelfhostedPrefix, envSelfhostedInsecure,
360340
))
341+
fs.MarkDeprecated("selfhosted-insecure", "No longer supported, you MUST provide the CA Chain.")
361342
}
362343

363344
func (o *Options) complete() error {

0 commit comments

Comments
 (0)