Commit Graph

29 Commits

Author SHA1 Message Date
Ole Markus With 381ceb1d14 Revert back to using kubectl in channels
Introduces an Applier interface and keeps the custom client based implementation
2022-08-14 13:06:17 +02:00
Ole Markus With 70181ec3b3 Remove --files flag from channels and make single arg mandatory 2022-08-02 20:27:36 +02:00
Ole Markus With 0bd3160bbc Merge channels and kops cli factories 2022-07-31 06:32:57 +02:00
Ole Markus With 389d7c1214 Set UserAgent to kops on the REST config 2022-07-02 16:13:30 +02:00
Ole Markus With cb96d39804 Use dynamic client for applying channels manifest rather than calling kubectl 2022-07-02 16:13:27 +02:00
Ole Markus With db5cee1320 Channels to have exit status 1 on apply failure 2022-06-08 10:32:01 +02:00
Ole Markus With ce2e877aeb Remove bazel files from vendor 2022-04-12 13:29:03 +02:00
Ole Markus With 5f6b480f81 Update cert-manager dependency to 1.8.0 2022-04-10 12:39:47 +02:00
Ole Markus With e128cc7f5d Preload channel versions from namespaces
Avoids loading the NS multiple times per installed addon
2022-01-05 10:38:26 +01:00
Ciprian Hacman ea7df00719 Run hack/update-gofmt.sh 2021-12-01 22:39:50 +02:00
justinsb 454c47f92b Support pruning in channels command
We let the addon specify exactly what should be pruned; this approach
is a little more verbose but we're likely generating this
automatically in the common case anyway.

In return for the verbosity, we can likely handle more future cases
and edge cases (for example removing objects that aren't labelled or
are in the wrong namespace).
2021-10-15 17:47:13 -04:00
Ciprian Hacman 8bbc88eb2e Disallow the use of legacy addons 2021-07-31 05:33:26 +03:00
Ole Markus With 0a43080957 Continue if a single addon fails to be applied 2021-07-06 08:31:49 +02:00
Ciprian Hacman 2f3bad686a Remove version from addons 2021-06-25 19:25:01 +03:00
Ole Markus With d41f68c6ef Make channels create PKI for addons that needs it 2021-01-30 09:01:33 +01:00
Peter Rifel e232c6616a
Cleanup channels error output
This removes a redundant printing of error messages and no longer prints the usage help text when channels fails.

Before:
```
NAME				CURRENT	UPDATE
core.addons.k8s.io		-	1.4.0
dns-controller.addons.k8s.io	-	1.19.0-alpha.4
kops-controller.addons.k8s.io	-	1.19.0-alpha.4
kube-dns.addons.k8s.io		-	1.15.13-kops.3
kubelet-api.rbac.addons.k8s.io	-	v0.0.1
limit-range.addons.k8s.io	-	1.5.0
storage-aws.addons.k8s.io	-	1.15.0
I1018 16:49:43.908920   87960 addon.go:140] Applying update from "kops/upup/pkg/fi/cloudup/tests/bootstrapchannelbuilder/simple/dns-controller.addons.k8s.io/k8s-1.12.yaml"
Error: error updating "dns-controller.addons.k8s.io": error applying update from "kops/upup/pkg/fi/cloudup/tests/bootstrapchannelbuilder/simple/dns-controller.addons.k8s.io/k8s-1.12.yaml": error reading manifest: open kops/upup/pkg/fi/cloudup/tests/bootstrapchannelbuilder/simple/dns-controller.addons.k8s.io/k8s-1.12.yaml: no such file or directory
Usage:
  channels apply channel [flags]

Flags:
  -f, --filename strings   Apply from a local file
  -h, --help               help for channel
      --yes                Apply update

Global Flags:
      --add_dir_header                   If true, adds the file directory to the header of the log messages
      --alsologtostderr                  log to standard error as well as files
      --config string                    config file (default is $HOME/.channels.yaml)
      --log_backtrace_at traceLocation   when logging hits line file:N, emit a stack trace (default :0)
      --log_dir string                   If non-empty, write log files in this directory
      --log_file string                  If non-empty, use this log file
      --log_file_max_size uint           Defines the maximum size a log file can grow to. Unit is megabytes. If the value is 0, the maximum file size is unlimited. (default 1800)
      --logtostderr                      log to standard error instead of files (default true)
      --skip_headers                     If true, avoid header prefixes in the log messages
      --skip_log_headers                 If true, avoid headers when opening log files
      --stderrthreshold severity         logs at or above this threshold go to stderr (default 2)
  -v, --v Level                          number for the log level verbosity
      --vmodule moduleSpec               comma-separated list of pattern=N settings for file-filtered logging

error updating "dns-controller.addons.k8s.io": error applying update from "kops/upup/pkg/fi/cloudup/tests/bootstrapchannelbuilder/simple/dns-controller.addons.k8s.io/k8s-1.12.yaml": error reading manifest: open kops/upup/pkg/fi/cloudup/tests/bootstrapchannelbuilder/simple/dns-controller.addons.k8s.io/k8s-1.12.yaml: no such file or directory
```

After:
```
NAME				CURRENT	UPDATE
core.addons.k8s.io		-	1.4.0
dns-controller.addons.k8s.io	-	1.19.0-alpha.4
kops-controller.addons.k8s.io	-	1.19.0-alpha.4
kube-dns.addons.k8s.io		-	1.15.13-kops.3
kubelet-api.rbac.addons.k8s.io	-	v0.0.1
limit-range.addons.k8s.io	-	1.5.0
storage-aws.addons.k8s.io	-	1.15.0
I1018 16:51:08.918451   88636 addon.go:140] Applying update from "kops/upup/pkg/fi/cloudup/tests/bootstrapchannelbuilder/simple/core.addons.k8s.io/v1.4.0.yaml"

error updating "core.addons.k8s.io": error applying update from "kops/upup/pkg/fi/cloudup/tests/bootstrapchannelbuilder/simple/core.addons.k8s.io/v1.4.0.yaml": error reading manifest: open kops/upup/pkg/fi/cloudup/tests/bootstrapchannelbuilder/simple/core.addons.k8s.io/v1.4.0.yaml: no such file or directory
```
2020-10-18 16:52:56 -06:00
Ciprian Hacman a7c8d2087c Use github.com/blang/semver/v4 2020-07-01 08:54:42 +03:00
Justin Santa Barbara 31bb16d4d1 Add context.Context to most signatures
The client-go signature for most methods adds a context.Context
object, and also makes Options mandatory.  Feed through a
context.Context through many of our methods (but use context.TODO to
stop it getting totally out of hand!)
2020-04-11 14:44:17 -04:00
John Gardiner Myers 19f35385b2 Remove commented out code 2020-01-23 21:09:21 -08:00
mikesplain 9e55b8230a Update copyright notices
Also cleans some white spaces
2019-09-09 14:47:51 -04:00
Derek Lemon -T (delemon - AEROTEK INC at Cisco) 4f0169bb79 codegen 2019-01-16 09:30:40 -07:00
Aleksandar Topuzovic c68b46afdc
Support for auth plugins in channels
* Otherwise I get:
  Error: cannot build kube client: No Auth Provider found for name "oidc"
2018-03-23 14:27:30 +00:00
chrislovecnm 609e268a1d gazelle updates with new bazel version 2017-11-05 17:41:53 -07:00
chrislovecnm 1e418c3e13 more goimport updates 2017-11-04 10:03:02 -06:00
Justin Santa Barbara 0143be7c4f autogen: BUILD and BUILD.bazel 2017-10-02 14:27:21 -04:00
Justin Santa Barbara 3478031533 API types changed package 2017-10-01 14:03:56 -04:00
Justin Santa Barbara 799142b3fc channels: accept -f and --files 2017-04-19 00:17:13 -04:00
Justin Santa Barbara aafe8aca21 Add docs for addon manager 2017-04-08 12:21:22 -04:00
Justin Santa Barbara a7c2c554e1 channels: support targeting kubernetes versions 2017-04-08 11:08:03 -04:00