Commit graph

649 commits

Author SHA1 Message Date
Hidde Beydals
ff6a1c14be Rename 'gitops-system' namespace to 'gotk-system'
To align with the project name, and the group introduced in #236.
2020-09-30 22:32:26 +02:00
stefanprodan
d902c71a6f Update components to v0.1 2020-09-30 23:09:21 +03:00
Stefan Prodan
cf080330ba
Merge pull request #276 from fluxcd/kustomize-bootstrap-dir
Generate a kustomize package for the bootstrap manifests
2020-09-29 08:45:52 +03:00
stefanprodan
2373bacb0c Generate a kustomize package for the bootstrap manifests 2020-09-29 08:36:28 +03:00
stefanprodan
393be92632 Add support for multi-namespace tenant ownership 2020-09-26 16:42:36 +03:00
stefanprodan
d11fa476e1 Refactor object kind/name parsing 2020-09-23 18:19:33 +03:00
stefanprodan
bd2994f9ab Add support for Bucket sources to Kustomizations/HRs 2020-09-23 16:44:31 +03:00
stefanprodan
34147d7694 Add validation for bucket providers 2020-09-23 12:30:14 +03:00
stefanprodan
a02452ccb9 Implement bucket CRUD commands 2020-09-23 12:04:28 +03:00
stefanprodan
1c7994a353 Add support for namespace/name format in depends-on 2020-09-22 18:11:00 +03:00
stefanprodan
7b4e815a8d Always apply sync manifests on bootstrap 2020-09-22 14:58:51 +03:00
Stefan Prodan
b0e407bf30
Merge pull request #254 from fluxcd/uninstall-fix
Suspend bootstrap kustomization on uninstall
2020-09-22 09:29:23 +03:00
stefanprodan
f93a40a18b Suspend bootstrap kustomization on uninstall 2020-09-22 08:54:49 +03:00
stefanprodan
9b0c44162a Validate bootstrap required components 2020-09-22 08:23:01 +03:00
stefanprodan
101e7bbce0 Add support for ARMv7 2020-09-21 10:37:55 +03:00
stefanprodan
fafcf09570 Add -n shorthand for namespace flag 2020-09-16 15:10:34 +03:00
stefanprodan
0b14328024 Use the group version for HR APIVersion 2020-09-16 13:59:46 +03:00
stefanprodan
2096532f5d Add create tenant command 2020-09-15 16:49:48 +03:00
stefanprodan
4136eb1444 Add export resource helper function 2020-09-15 16:36:13 +03:00
Stefan Prodan
67e0acd044
Merge pull request #235 from stealthybox/shell-completions
Support bash, fish, zsh, and powershell shell completions as separate sub-commands
2020-09-15 12:15:47 +03:00
leigh capili
cbcdfc5f6c Support bash, fish, zsh, and powershell shell completions as separate sub-commands 2020-09-14 16:35:55 -06:00
stefanprodan
c36e02bba9 Update kustomize-controller to v0.0.12 2020-09-14 18:20:05 +03:00
stefanprodan
2bac5aabee Add log level flag 2020-09-14 12:35:24 +03:00
stefanprodan
d5e78b9f80 Add watch all namespaces flag 2020-09-13 10:38:15 +03:00
stefanprodan
531c2bcf00 Import fluxcd/pkg/runtime 2020-09-12 12:04:37 +03:00
stefanprodan
a7b1b04920 Add bootstrap reinstall e2e test 2020-09-09 17:27:56 +03:00
stefanprodan
1218d6abe8 Add branch flag to bootstrap cmd 2020-09-09 16:41:48 +03:00
stefanprodan
afef6960b9 Cleanup GitHub e2e repo 2020-09-09 14:03:26 +03:00
stefanprodan
b1e66f81ab Add label validation 2020-09-08 20:08:28 +03:00
stefanprodan
797cd9bea2 Add label arg to create commands 2020-09-08 18:03:04 +03:00
Hidde Beydals
f18d1efdcb Refactor HelmRelease chart source kind validation 2020-09-07 11:13:15 +02:00
stefanprodan
8b6995e9ec Add decryption flags to create kustomization cmd 2020-09-06 13:56:56 +03:00
stefanprodan
5c8d00665f Use GitHub Container Registry for AMD64/ARM64 images 2020-09-04 17:18:33 +03:00
Stefan Prodan
f4d78cc08e
Merge pull request #202 from fluxcd/arch
Add ARM64 support to install/bootstrap
2020-09-04 16:37:03 +03:00
stefanprodan
3f07bd6471 Add arch flag to install/bootstrap 2020-09-04 12:46:08 +03:00
Hidde Beydals
2f861f19c0 Update gotk create helmrelease examples
To better reflect optional fields and highlight specific configuration
options.
2020-09-03 19:31:19 +02:00
Hidde Beydals
e53d0dadbf Support GitRepository source in HelmRelease cmds 2020-09-03 11:16:57 +02:00
Hidde Beydals
fa56685767 Upgrade Toolkit components and K8S deps
* github.com/fluxcd/helm-controller/api to v0.0.6
* github.com/fluxcd/source-controller/api to v0.0.13

* k8s.io/api to v0.18.8
* k8s.io/apiextensions-apiserver to v0.18.8
* k8s.io/apimachinery to v0.18.8
* k8s.io/client-go to v0.18.8
* sigs.k8s.io/controller-runtime to v0.6.2
2020-09-03 11:16:50 +02:00
Hidde Beydals
22624ae4d5 Rename tk binary to gotk
To avoid conflicts with the `tk` binary from the Tanka project.
2020-09-01 11:33:49 +02:00
Hidde Beydals
e751bdc8a9 Change readiness check for HelmRelease
As the HelmRelease injects its own HelmChart, the first reconciliation
will always trigger a `Ready==False` condition while it waits for the
chart to become ready. Given this, we should only take this condition
into account when the `status.LastAttemptedRevision` has been recorded,
as this marks the fact that the chart is available and an action was
attempted.
2020-09-01 11:15:53 +02:00
Hidde Beydals
2078d048a1 Fix: change v1.JSON for HelmRelease to pointer 2020-08-28 15:20:34 +02:00
stefanprodan
b5ed8f0183 Add SSH hostname arg to GitLab bootstrap 2020-08-21 17:37:44 +03:00
stefanprodan
17df7a46e2 Make export work offline 2020-08-17 19:58:17 +03:00
Hidde Beydals
123433c4ea Support providing TLS certs for helm source 2020-07-31 16:29:52 +02:00
Manuel Morejon
ffd4784916
Replace tab by space 2020-07-26 00:35:40 +02:00
Manuel Morejon
750830c302
Replace tk sync example by tk reconcile 2020-07-26 00:24:58 +02:00
Manuel Morejon
d245ef9b39
Remove tk sync example from help command
Signed-off-by: Manuel Morejon <manuel@mmorejon.io>
2020-07-25 14:32:33 +02:00
stefanprodan
c2ff169c08 Add image pull secret arg to install/bootstrap 2020-07-23 13:38:32 +03:00
stefanprodan
57a1dbfc6d Add container registry option to install/bootstrap 2020-07-23 13:07:34 +03:00
Stefan Prodan
efb39d6fc6
Merge pull request #127 from fluxcd/node-selector
Add linux/amd64 node selector to controllers
2020-07-23 12:44:34 +03:00
stefanprodan
aebad92426 Add linux/amd64 node selector to controllers
Set nodeSelector to linux/amd64 for clusters with mixed nodes (linux, windows, amd64, arm).
2020-07-23 09:59:45 +03:00
stefanprodan
8e67cfd5c9 Delete custom resources during uninstall
Remove Kustomizations, GitRepositories and HelmRepositories before deleting the toolkit controllers and CRDs.
2020-07-23 09:26:10 +03:00
stefanprodan
3620b76139 Make notification component optional 2020-07-22 14:30:39 +03:00
stefanprodan
0b2bc7ab3f Implement get/export HelmRelease for Helm releases 2020-07-21 14:22:20 +03:00
stefanprodan
797aec5528 Add create/delete HelmRelease e2e tests 2020-07-21 14:02:29 +03:00
stefanprodan
5f0b95dc59 Implement create/delete for Helm releases 2020-07-21 12:20:41 +03:00
stefanprodan
8534ccbf37 Implement Helm repository commands 2020-07-21 10:39:17 +03:00
stefanprodan
9af874d810 Add examples to all tk commands 2020-07-21 10:38:44 +03:00
stefanprodan
aaad618e20 Rename kustomization arg from validate to validation
Fix `tk create kustomization` command args inconsistency with the Kustomize API
2020-07-20 15:10:33 +03:00
stefanprodan
670070a879 Drop support for Kubernetes <1.16 2020-07-20 14:37:50 +03:00
stefanprodan
b92cbcd7e7 Use semver manifests as kustomize base
Instead of cloning the components repositories to download the base manifests, we build them in CI at release time and download them in tk install/bootstrap based on the provided semver. This speeds up the manifests generation from minutes to milliseconds.
2020-07-17 13:10:19 +03:00
stefanprodan
499ba15004 Add export option to tk install 2020-07-16 15:56:05 +03:00
stefanprodan
c664484fda Update controllers and go modules
- update source-controller to v0.0.5
- update kustomize-controller to v0.0.4
- update notification-controller to v0.0.4
- update helm-controller to v0.0.1-alpha.2
2020-07-16 11:30:45 +03:00
stefanprodan
8dc5db17ac Add helm suspend/resume commands 2020-07-14 14:00:59 +03:00
stefanprodan
7a68c4ccf3 Add reconcile helm commands 2020-07-14 13:34:00 +03:00
stefanprodan
394227571f Rename sync cmd to reconcile 2020-07-14 11:45:15 +03:00
stefanprodan
e180611024 Refactor defaults
- add dedicated components flag for bootstrap/install/check
- extract defaults to vars
- update CLI docs
2020-07-14 11:02:37 +03:00
stefanprodan
02521b6964 Add helm-controller to installer 2020-07-13 18:44:54 +03:00
stefanprodan
e594350307 Add notification controller to tk components 2020-07-02 12:52:55 +03:00
stefanprodan
4621afcb31 Migrate to fluxcd/pkg 2020-06-30 17:11:04 +03:00
Hidde Beydals
329e21fd78 Create logger interface 2020-06-25 18:05:15 +02:00
Hidde Beydals
d7f8a05612 Sort supported ECDSA curves names
To ensure options are always printed in the same order.
2020-06-25 17:53:41 +02:00
Hidde Beydals
21fd436621 Add descriptions to all CLI commands 2020-06-25 15:49:31 +02:00
stefanprodan
892230280c Honour KUBECONFIG environment variable 2020-06-24 09:25:30 +03:00
Hidde Beydals
0e81f6c3af docs: disable autogen footer CLI docs 2020-06-23 16:25:55 +02:00
Hidde Beydals
cf45401250
Merge pull request #59 from fluxcd/git/author-email
Use owner in Git author email
2020-06-23 13:38:15 +02:00
Hidde Beydals
15429160c7 Use owner in Git author email 2020-06-23 13:19:56 +02:00
Hidde Beydals
dbfa2f9944 Improve cmd messages 2020-06-23 12:54:51 +02:00
Hidde Beydals
1df5a36f84 Copyright headers 2020-06-23 11:25:38 +02:00
stefanprodan
3d7349ee53 Generate cmd docs 2020-06-19 17:44:08 +03:00
stefanprodan
9ffe908c66 Add docs intro 2020-06-19 17:00:10 +03:00
stefanprodan
d0a79c2b4c Use git package for bootstrap 2020-06-18 09:59:39 +03:00
stefanprodan
f3d50e158a Implement GitLab bootstrap 2020-06-18 00:32:32 +03:00
stefanprodan
4f43b504f4 Assign GitHub teams during bootstrap 2020-06-16 16:09:37 +03:00
stefanprodan
dca7b0ba91 Recreate GitHub deploy key during bootstrap 2020-06-12 18:05:00 +03:00
Stefan Prodan
2a61befbfd
Merge pull request #39 from fluxcd/bootstrap-path
Add target path to the bootstrap cmd
2020-06-12 16:11:09 +03:00
stefanprodan
4992e11383 Add target path to the bootstrap cmd 2020-06-12 15:57:34 +03:00
stefanprodan
727734850e Add kustomizations removal to uninstall cmd 2020-06-10 18:49:38 +03:00
stefanprodan
0cd820e923 Add export for public git repos 2020-06-09 16:22:35 +03:00
stefanprodan
51ca2ee9d8 Improve cluster sync wait 2020-06-09 16:12:40 +03:00
stefanprodan
e612a8a496 Implement SSH deploy key bootstrap 2020-06-09 15:24:36 +03:00
stefanprodan
e70d86e843 Fix SSH secret upsert 2020-06-09 15:23:19 +03:00
stefanprodan
1bc637a43f Add export flag to create commands 2020-06-09 13:52:21 +03:00
stefanprodan
f5b738198f Add support for GitHub Enterprise 2020-06-09 13:52:21 +03:00
stefanprodan
34ea89c3be Create GitHub repo if it doesn't exists 2020-06-09 13:52:21 +03:00
stefanprodan
d4cbc45e16 Add personal and public options to bootstrap 2020-06-09 13:52:21 +03:00
stefanprodan
59ae2f327c Implement bootstrap upgrade 2020-06-09 13:52:21 +03:00
stefanprodan
4ec5b7fc69 Implement GitHub repository bootstrap 2020-06-09 13:52:21 +03:00
Hidde Beydals
65cfa6d347 Move port check to scanHostKey func 2020-06-09 12:42:37 +02:00
Hidde Beydals
9099ad3d8b Split cmd SSH/auth functions 2020-06-09 12:30:47 +02:00
Hidde Beydals
6017946144 Improve host key scanner, add Ed25519 generator 2020-06-09 11:30:57 +02:00
Hidde Beydals
3a8151bcc0 Add various custom flags 2020-06-08 20:06:54 +02:00
Hidde Beydals
2dfe88b82d Move ssh package from internal to pkg 2020-06-08 13:44:51 +02:00
Hidde Beydals
a332e12338 Replace SSH shell-outs with Go implementation 2020-06-06 21:42:54 +02:00
stefanprodan
f231107869 Set tk version at release time 2020-05-29 18:29:26 +03:00
stefanprodan
1e7d2e7dce Use kustomize API instead of binary 2020-05-12 08:18:16 +03:00
stefanprodan
89aa7463ef Release v0.0.1-alpha.1 2020-05-06 14:17:13 +03:00
stefanprodan
5c2c4ccdba Add service account args
- update kustomize-controller to v0.0.1-alpha.7
- change args to match the v0.0.1-alpha.7 API
- add service account args
2020-05-05 20:00:37 +03:00
stefanprodan
d8802b7d4a Fix resume waiting 2020-05-03 13:29:16 +03:00
stefanprodan
afcb41c59b Add bash completion cmd 2020-05-01 22:06:44 +03:00
stefanprodan
155cc66db9 Fix get cmd early exit 2020-05-01 19:47:56 +03:00
stefanprodan
9069a65a97 Add -s alias for silent arg 2020-05-01 19:47:56 +03:00
stefanprodan
5530362568 Add credentials export option for git sources 2020-04-30 11:03:53 +03:00
stefanprodan
f127adc8ea Implement export to YAML
- add export commands for git sources and kustomizations
- add export e2e tests
2020-04-30 00:12:16 +03:00
stefanprodan
6d590fe4d2 Implement delete for git sources
- add delete source git command
- add delete source git e2e test
2020-04-29 23:40:03 +03:00
stefanprodan
e5e06783bd Implement ks delete, suspend, resume commands
- add delete kustomization command with confirmation and warning id not suspended
- add suspend kustomization command
- add resume kustomization command
- add suspend/resume/delete e2e tests
2020-04-29 17:45:22 +03:00
stefanprodan
2225b2a6a9 Implement get commands
- add get sources git command
- add get kustomizations command
2020-04-29 13:52:15 +03:00
stefanprodan
1e03155e8b Add poll interval global variable 2020-04-29 10:48:12 +03:00
stefanprodan
6d66f42382 Add ks alias to kustomization commands 2020-04-29 09:53:29 +03:00
stefanprodan
cfa72ddb0b log: improve cmd logs 2020-04-29 09:35:49 +03:00
stefanprodan
0f99f313a0 check: exit 1 on control plane failed checks 2020-04-29 09:10:27 +03:00
stefanprodan
21e0d38152 Implement sync command
- sync git sources
- sync kustomizations along with their sources
2020-04-29 08:50:27 +03:00
stefanprodan
8d15970dbe Add wait log 2020-04-29 08:25:12 +03:00
stefanprodan
c6793f6eaf Refactor create command
- move GitRepository operations to create source git
- update examples and e2e tests
2020-04-28 23:51:23 +03:00
stefanprodan
3bcc2ae992 Format commands examples 2020-04-28 21:01:20 +03:00
stefanprodan
a0ed1c2037 Add git tag option to create source 2020-04-28 20:24:00 +03:00
stefanprodan
076aa09a99 Update source if exists 2020-04-28 11:51:22 +03:00
stefanprodan
57474fb274 Implement create kustomization 2020-04-28 11:34:35 +03:00
stefanprodan
78af1dd2b4 Implement components selection
- add components global flag
- install selected components
- check selected components
2020-04-27 16:59:04 +03:00
stefanprodan
a9128a2cb4 Log source sync failure message 2020-04-27 10:49:23 +03:00
stefanprodan
0f5204a8c1 Refactor create source
- use source API package instead of a text template
- use controller-runtime client instead of kubectl
2020-04-26 23:37:06 +03:00
stefanprodan
d6d7bc329a Add silent option to uninstall 2020-04-26 10:58:25 +03:00
stefanprodan
98c32dce3d Refactor exec helpers 2020-04-26 10:39:20 +03:00
stefanprodan
09678d7966 Add version arg to install command 2020-04-25 23:27:41 +03:00
stefanprodan
4a872836e3 Generate tk docs with cobra/doc 2020-04-25 20:07:48 +03:00
stefanprodan
8392c4fe24 Refactor logging 2020-04-25 13:16:34 +03:00
stefanprodan
2d300d7344 Add semver condition to check output 2020-04-25 12:10:24 +03:00
stefanprodan
13760258ab Add verbose option to create source 2020-04-25 12:06:25 +03:00
stefanprodan
e308097785 Add timeout option to install/uninstall 2020-04-25 11:50:42 +03:00
stefanprodan
7d1a14d09a Add uninstall cmd 2020-04-25 11:23:09 +03:00
stefanprodan
4d8800ad62 Add basic-auth option to create source 2020-04-25 10:29:54 +03:00
stefanprodan
9cec671f6c Add public repos and semver support to create cmd 2020-04-25 00:02:09 +03:00
stefanprodan
1371b4d4d3 Implement create source for ssh git repos
- generate host keys and SSH keys
- prompt for deploy key setup
- generate gitrepo source
- wait for source to sync
2020-04-24 22:32:17 +03:00
stefanprodan
bba9ac0aa1 Add ssh tools to requirements check 2020-04-24 20:54:05 +03:00
stefanprodan
403a0f2882 Add check command
- verify minimum supported version of kubectl, kustomize and
Kubernetes API
2020-04-24 19:43:12 +03:00
stefanprodan
94e0b3c9c3 Add install command with dry-run option
- build kustomization
- apply output on the cluster
- check rollout status of source and kustomize controllers
2020-04-24 18:18:41 +03:00
stefanprodan
e304059299 Add kubeconfig global flag 2020-04-24 15:07:03 +03:00
stefanprodan
4f449a1ffd Add check command 2020-04-24 14:30:48 +03:00
stefanprodan
c8fdf76084 Init toolkit CLI 2020-04-24 14:30:27 +03:00