Commit Graph

55 Commits

Author SHA1 Message Date
Ole Markus With f4e3dd3e26 Rename NeedUpdate struct to NeedsRollingUpdate 2020-11-16 19:48:18 +01:00
Ole Markus With 2659a30280 Make get instances respect needs-update annotation
Make it possible for addons to set needs-update annotation

Use onDelete update strategy for cilium and set needs-update annotation

Rename node roles
2020-11-16 08:26:17 +01:00
Kubernetes Prow Robot edd034b986
Merge pull request #10068 from rifelpet/channels-errors
Cleanup channels error output
2020-10-19 11:02:14 -07: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
Nicholas Turner 0e442aaadd Fix staticcheck and gofmt
Co-authored-by: Ciprian Hacman <ciprianhacman@gmail.com>
2020-10-14 23:55:59 -07:00
Nick Turner 61ac9a5b07 Fix bug in MergeAddons
* Replace existing addon if v (new) replaces() existing, instead
  of the other way around.
2020-10-13 10:55:31 -07:00
Nick Turner f8d00cc535 Add test for Addon Menu and fix merge functionality 2020-10-13 10:54:32 -07:00
Peter Rifel 4d9f0128a3
Upgrade to klog2
This splits up the kubernetes 1.19 PR to make it easier to keep up to date until we get it sorted out.
2020-08-16 20:56:48 -05: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
Kubernetes Prow Robot 79bbc3ef19
Merge pull request #8408 from johngmyers/channel-versions
Refuse to read channels with addons with unparseable versions
2020-02-25 17:58:27 -08:00
John Gardiner Myers 8844b97fe3 Fix field names in api validation 2020-02-15 14:52:27 -08:00
John Gardiner Myers a2bc9cca26 Verify addon versions in BootstrapChannelBuilder 2020-01-26 17:55:00 -08:00
John Gardiner Myers 19f35385b2 Remove commented out code 2020-01-23 21:09:21 -08:00
John Gardiner Myers 61e0694980 Refuse to read channels with addons with unparseable versions 2020-01-23 21:09:20 -08:00
feifei.zhang@huawei.com 4b49412105 fix golint failures 2019-10-31 20:22:37 +08:00
tanjunchen 279c429abd remove the unnecessary newline and unused vars 2019-10-08 22:43:10 +08:00
mikesplain 9e55b8230a Update copyright notices
Also cleans some white spaces
2019-09-09 14:47:51 -04:00
Ryan Bonham 62d4b128ce
Improve channel updates, to use hash of manifests to ensure we always update on changes 2019-07-22 07:26:06 -07:00
Justin SB 76d03b3f71
Generated files: glog -> klog 2019-05-06 12:56:03 -04:00
Justin SB 3e33ac7682
Change code from glog to klog
We don't call klog.InitFlags yet, because that will cause a flag
redefinition error until we get everyone to stop using glog.  That
will happen when we update to k8s 1.13.
2019-05-06 12:54:51 -04:00
Derek Lemon -T (delemon - AEROTEK INC at Cisco) 4f0169bb79 codegen 2019-01-16 09:30:40 -07:00
xichengliudui 6414b9e892 delete some code 2018-11-13 13:22:58 -05:00
Bily Zhang f1aae1d268
Update addons_test.go 2018-11-05 21:21:16 +08:00
mooncake 6ba9f22ab8 Fix typos: iff -> if
Signed-off-by: mooncake <xcoder@tenxcloud.com>
2018-11-04 16:59:45 +08:00
Justin Santa Barbara 3fecc1350a Removed misleading comment about metav1
@rdrgmnzs pointed out that the comment needed to be updated after
Removing!
2018-10-08 16:44:39 -07:00
Justin Santa Barbara 62e8e17077 Code fixes for k8s 1.11 API changes 2018-09-28 20:14:45 -04:00
AdamDang 5e1a9315d3
Update addon.go
line 140: return nil, fmt.Errorf("error applying annotation to to record addon installation: %v", err)
I guess the word "to to" is duplicated here, isn't it?
2018-03-31 22:48:14 +08: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
Mike Splain 45a57915e2 Fix bazel deprecation notice 2018-02-26 09:36:13 -05:00
chrislovecnm 4dd3bb1dea Updating bazel BUILD files with new go_rules version 2017-12-29 15:03:14 -07: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
Chris Love 3fe6e04c7a Merge pull request #2336 from justinsb/channels_f_alias
channels: accept -f and --files
2017-04-19 05:09:55 -06:00
Justin Santa Barbara 799142b3fc channels: accept -f and --files 2017-04-19 00:17:13 -04:00
Justin Santa Barbara 12e61b1378 Fix channel version format string 2017-04-10 12:24:46 -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
Justin Santa Barbara 4006741a5d Update for new taints / labels names 2017-03-27 23:13:39 -04:00
Justin Santa Barbara cb4641fea3 Code updates 2017-03-16 02:40:50 -04:00
Justin Santa Barbara 2d37ab1ca5 Recommend a k8s version based on each kops version
So the flow is that we recommend (or strongly recommend) a new kops
version when one is required for a new version, and then the new kops
version will recommend (or strongly recommend) a new k8s version.

We don't have a notion of multiple recommended k8s versions per kops
version - that is what channels are for.

Users are always free to disregard updates, even "required" ones by
setting a flag.
2017-02-06 01:06:03 -05:00
Justin Santa Barbara 1e30ca7018 Fix channels build
Looks like I forgot to update it for the k8s API update
2017-01-05 01:30:48 -05:00
Justin Santa Barbara 04e8cab909 Fix for serialization of unversioned channels object 2017-01-03 22:26:08 -05:00
Justin Santa Barbara a375b1af82 Updates for k8s 1.6 code 2017-01-03 20:32:48 -05:00
Justin Santa Barbara 27026ff110 Misc build fixes for dns-controller 2016-11-19 15:01:00 -05:00
Justin Santa Barbara ee44353cde Add support for kopeio networking 2016-11-16 14:20:23 -05:00
chrislovecnm 8fa2aac99f fixing more headers 2016-10-15 19:20:56 -06:00
Justin Santa Barbara 90a075f50e Refactor Channel FindImage
Also fixes an issue where `kops upgrade` can't find the latest image in
the manifest.
2016-10-01 15:46:07 -04:00