Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Separate federation build.sh into development and deployment scripts. #30744

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion build/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1036,10 +1036,11 @@ function kube::release::package_full_tarball() {
mkdir -p "${release_stage}/third_party"
cp -R "${KUBE_ROOT}/third_party/htpasswd" "${release_stage}/third_party/htpasswd"

# Include only federation/cluster and federation/manifests
# Include only federation/cluster, federation/manifests and federation/deploy
mkdir "${release_stage}/federation"
cp -R "${KUBE_ROOT}/federation/cluster" "${release_stage}/federation/"
cp -R "${KUBE_ROOT}/federation/manifests" "${release_stage}/federation/"
cp -R "${KUBE_ROOT}/federation/deploy" "${release_stage}/federation/"

cp -R "${KUBE_ROOT}/examples" "${release_stage}/"
cp -R "${KUBE_ROOT}/docs" "${release_stage}/"
Expand Down
37 changes: 26 additions & 11 deletions federation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,42 @@ as explained in that guide, you also need to install [`jq`](https://stedolan.git
which this workflow depends, so we are giving an exception to jq
for now. -->

Building cluster federation should be as simple as running:
Building cluster federation artifacts should be as simple as running:

```shell
make build do=gen
make build
```

To deploy clusters and install federation components, edit the
`config.default.json` file to describe your clusters and run
You can specify the docker registry to tag the image using the
KUBE_REGISTRY environment variable. Please make sure that you use
the same value in all the subsequent commands.

To push the built docker images to the registry, run:

```shell
make push
```

To initialize the deployment run:

(This pull the installer images)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pulls


```shell
make build do=deploy
make init
```

To deploy the clusters and install the federation components, edit the
`${KUBE_ROOT}/_output/federation/config.json` file to describe your
clusters and run:

```shell
make deploy
```

To turn down the federation components and tear down the clusters run:

```shell
make build do=destroy
make destroy
```

# Ideas for improvement
Expand All @@ -53,11 +72,7 @@ make build do=destroy
12. `destroy`: destroy-federation + destroy-clusters
13. `redeploy-federation`: just redeploys the federation components.

2. Add a `release` phase to run as part of Kubernetes release process
that copies only a part of the `build.sh` script that's relevant to
the users into the release.

3. Continue with `destroy` phase even in the face of errors.
2. Continue with `destroy` phase even in the face of errors.

The bash script sets `set -e errexit` which causes the script to exit
at the very first error. This should be the default mode for deploying
Expand Down
217 changes: 0 additions & 217 deletions federation/build.sh

This file was deleted.

File renamed without changes.