Commit Graph

32 Commits (b04e18c4a0a11f12068f8a5b9f7ed411bd11fd42)

Author SHA1 Message Date
guoguangwu 2215870d5d chore: pkg imported more than once
Signed-off-by: guoguangwu <guoguangwu@magic-shield.com>
2023-06-26 16:58:11 -07:00
Brad Davidson ad41fb8c96 Create CRDs with schema
Fixes an issue where CRDs were being created without schema, allowing
resources with invalid content to be created, later stalling the
controller ListWatch event channel when the invalid resources could not
be deserialized.

This also requires moving Addon GVK tracking from a status field to
an annotation, as the GroupVersionKind type has special handling
internal to Kubernetes that prevents it from being serialized to the CRD
when schema validation is enabled.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2023-04-27 20:42:46 -07:00
Brad Davidson 68a56ff8d8 Add GVK lookup to deploy controller
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2022-10-26 15:08:13 -07:00
Derek Nola 06d81cb936
Replace deprecated ioutil package (#6230)
* Replace ioutil package
* check integration test null pointer
* Remove rotate retries

Signed-off-by: Derek Nola <derek.nola@suse.com>
2022-10-07 17:36:57 -07:00
Donnie Adams c38a8c3b43
Remove objects when removed from manifests (#5560)
* Remove objects when removed from manifests

If a user puts a file in /var/lib/rancher/k3s/server/manifests/ then the
objects contained therein are deployed to the cluster. If the objects
are removed from that file, they are not removed from the cluster.

This change tracks the GVKs in the files and will remove objects when
there are removed from the cluster.

Signed-off-by: Donnie Adams <donnie.adams@suse.com>
2022-05-18 11:05:03 -07:00
Deshi Xiao c1095dd015
fix: non-idiomatic returning of boolean expression (#5343)
should use 'return disables[baseName]' instead of 'if disables[baseName] { return true }; return false'

Signed-off-by: Deshi Xiao <xiaods@gmail.com>
2022-04-11 12:46:29 -07:00
Brad Davidson 965d0a08ef Fix log spam due to servicelb event recorder namespace conflict
Don't hardcode the event namespace when creating event recorders; some controllers want to create events in other namespaces.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2022-03-23 16:01:21 -07:00
Luther Monson 9a849b1bb7
[master] changing package to k3s-io (#4846)
* changing package to k3s-io

Signed-off-by: Luther Monson <luther.monson@gmail.com>

Co-authored-by: Derek Nola <derek.nola@suse.com>
2022-03-02 15:47:27 -08:00
Derek Nola bcb662926d
Secrets-encryption rotation (#4372)
* Regular CLI framework for encrypt commands
* New secrets-encryption feature
* New integration test
* fixes for flaky integration test CI
* Fix to bootstrap on restart of existing nodes
* Consolidate event recorder

Signed-off-by: Derek Nola <derek.nola@suse.com>
2021-12-07 14:31:32 -08:00
Brad Davidson 2a68c7c8a4 Fix issue where addon checksum was never stored
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2021-08-27 10:26:13 -07:00
Brad Davidson a7d1159ba6 Emit events for AddOn lifecycle
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2021-06-11 14:00:27 -07:00
Brad Davidson ea2cd6d727 Add comments, clean up imports and function names
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2021-06-11 14:00:27 -07:00
Brad Davidson 6ef000091a Add nodename to UA string for deploy controller
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2021-06-10 17:05:52 -07:00
Brad Davidson ae5b93a264 Use HasSuffixI utility function
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2021-02-17 11:48:03 -08:00
Brian Downs ba70c41cce
Initial Logging Output Update (#2246)
This attempts to update logging statements to make them consistent
through out the code base. It also adds additional context to messages
where possible, simplifies messages, and updates level where necessary.
2020-09-21 09:56:03 -07:00
Erik Wilson fec2c271c2 Check modification time before deploying manifests 2020-04-22 09:58:41 -07:00
galal-hussein 3f927d8006 Revert "Replace traefik with nginx"
This reverts commit 9a17033095.
2020-03-11 01:45:23 +02:00
galal-hussein 9a17033095 Replace traefik with nginx 2020-03-03 00:00:39 +02:00
Erik Wilson 0374c4f63d Add --disable flag 2020-01-30 16:45:01 -07:00
Erik Wilson b298733b3f Use lexical (sorted) order for file deployments 2019-11-12 16:05:09 -07:00
Thorsten Klein 50017c39a2 include subdirectories for auto-deploy manifests 2019-10-11 12:59:37 +02:00
Darren Shepherd d94a346a1e Switch to wrangler-api and helm-controller 2019-05-26 22:32:24 -07:00
Darren Shepherd c0702b0492 Port to wrangler 2019-05-26 22:28:50 -07:00
galal-hussein c42ea5ec89 Skip any file with no yaml yml or json suffix 2019-04-18 00:13:11 +02:00
Morten Lied Johansen 9033891f88 Skip writing manifest when using `--no-deploy`
Instead of skipping the manifest when listing the directory, we now skip
creating it in the first place. This allows users to deploy manifests
that replaces the ones bundled, without having to come up with a new
name.

Fixes #230.
2019-03-23 22:22:58 +01:00
Vladimir Zorin d1348b9898 Trim whitespaces before checking if line is empty or comment 2019-03-14 14:12:02 +02:00
Vladimir Zorin 567532d74d Do not process empty yaml objects (fixes #222) 2019-03-14 13:36:26 +02:00
Darren Shepherd 2771ae1ba9
Merge pull request #184 from ibuildthecloud/default-ns
Assign default namespace if not set in manifests
2019-03-07 13:04:50 -07:00
Darren Shepherd 769c1d5415 Fix manifest polling 2019-03-07 13:01:21 -07:00
Darren Shepherd bef4115657 Assign default namespace if not set in manifests 2019-03-07 13:00:35 -07:00
Darren Shepherd 91002f1fee Fix looping on startup while installing addons 2019-02-07 21:45:31 -07:00
Darren Shepherd 287e0f44c9 Prepare for initial release 2019-01-22 14:20:29 -07:00