-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #120 from cybozu-go/cleanup
Preparation for 2.0.0
- Loading branch information
Showing
9 changed files
with
102 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
coil-migrator | ||
============= | ||
|
||
`coil-migrator` is a helper to migrate existing Coil v1 cluster to v2. | ||
|
||
It has two sub commands: `dump` and `replace`. | ||
|
||
See [design.md](design.md#upgrading-from-v1) for the design and | ||
[#119](https://github.com/cybozu-go/coil/pull/119#issuecomment-704674318) for the usage. | ||
|
||
### dump sub command | ||
|
||
This command does the followings: | ||
|
||
- Remove Coil v1 resources from the cluster. | ||
- Annotate namespaces using non-default address pools. | ||
- Convert v1 data into v2 and dump them as YAML. | ||
|
||
These steps are idempotent and can be run multiple times. | ||
|
||
``` | ||
Usage: | ||
coil-migrator dump [flags] | ||
Flags: | ||
--etcd-endpoints endpoints comma-separated list of URLs (default http://127.0.0.1:2379) | ||
--etcd-password string password for etcd authentication | ||
--etcd-prefix string prefix for etcd keys (default "/coil/") | ||
--etcd-timeout string dial timeout to etcd (default "2s") | ||
--etcd-tls-ca string filename of etcd server TLS CA | ||
--etcd-tls-cert string filename of etcd client certficate | ||
--etcd-tls-key string filename of etcd client private key | ||
--etcd-username string username for etcd authentication | ||
-h, --help help for dump | ||
--skip-uninstall DANGER!! do not uninstall Coil v1 | ||
Global Flags: | ||
--kubeconfig string Paths to a kubeconfig. Only required if out-of-cluster. | ||
``` | ||
|
||
### replace sub command | ||
|
||
This command finalizes the migration from v1 to v2 by deleting | ||
all the currently running Pods and then deleting reserved blocks. | ||
|
||
``` | ||
Usage: | ||
coil-migrator replace [flags] | ||
Flags: | ||
-h, --help help for replace | ||
--interval duration interval before starting to remove pods on the next node (default 10s) | ||
Global Flags: | ||
--kubeconfig string Paths to a kubeconfig. Only required if out-of-cluster. | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
resources: | ||
- ../crd | ||
- ../rbac | ||
- ../pod | ||
- ../webhook | ||
- ./webhook-secret.yaml | ||
|
||
patchesStrategicMerge: | ||
- ./webhook_manifests_patch.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: coilv2-webhook-server-cert | ||
namespace: system | ||
annotations: | ||
cke.cybozu.com/issue-cert: coilv2-webhook-service |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
apiVersion: admissionregistration.k8s.io/v1beta1 | ||
kind: MutatingWebhookConfiguration | ||
metadata: | ||
name: coilv2-mutating-webhook-configuration | ||
annotations: | ||
cke.cybozu.com/inject-cacert: "true" | ||
--- | ||
apiVersion: admissionregistration.k8s.io/v1beta1 | ||
kind: ValidatingWebhookConfiguration | ||
metadata: | ||
name: coilv2-validating-webhook-configuration | ||
annotations: | ||
cke.cybozu.com/inject-cacert: "true" | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters