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

Fixes and improvements in smaller provider migration docs #204

Merged
merged 1 commit into from
May 17, 2023
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions docs/sp-migration-conf.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
```bash
kubectl get managed -o yaml > backup-mrs.yaml
kubectl get composite -o yaml > backup-composites.yaml
kubectl get claim -n $NAMESPACE -o yaml > backup-claims.yaml
kubectl get claim --all-namespaces -o yaml > backup-claims.yaml
```

2. Update deletion policy to `Orphan`:
Expand All @@ -30,7 +30,7 @@ kubectl get managed --no-headers -o jsonpath='{range .items[*]}{.apiVersion}{"\n
do
service=$(echo "${line}" | cut -d. -f1)
provider=$(echo "${line}" | cut -d. -f2)
if [[ ${provider} == "upbound" ]]; then
if [ "${provider}" = "upbound" ]; then
# azure.upbound.io is an exception where apiVersion does not contain the service name
# we have those resources in the family package
provider="azure"
Expand All @@ -41,12 +41,12 @@ do
filename="sp-manual.yaml"
providername="${provider}-${sp}"

if [[ "${sp}" == "config" ]] || [[ "${sp}" == "azure" ]]; then
# azure.upbound.io is an exception where apiVersion does not contain the service name
# we have those resources in the family package
providername="family-$provider"
filename="sp-family-manual.yaml"
fi
if [ "${sp}" = "config" ] || [ "${sp}" = "azure" ]; then
# azure.upbound.io is an exception where apiVersion does not contain the service name
# we have those resources in the family package
providername="family-$provider"
filename="sp-family-manual.yaml"
fi
if ! cat "${filename}" | grep provider-${providername}:${version} > /dev/null; then
echo "apiVersion: pkg.crossplane.io/v1
kind: Provider
Expand All @@ -61,7 +61,7 @@ spec:
done
```

4. Install config providers with `revisionActivationPolicy: Manual`:
4. Install family providers with `revisionActivationPolicy: Manual`:

Verify that `sp-family-manual.yaml` files are generated with the correct content

Expand Down Expand Up @@ -89,7 +89,7 @@ Verify that `sp-manual.yaml` files are generated with the correct content
cat sp-manual.yaml
```

Install the family provider
Install the smallers providers

```bash
kubectl apply -f sp-manual.yaml
Expand Down
32 changes: 16 additions & 16 deletions docs/sp-migration-mr.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ kubectl get managed --no-headers -o jsonpath='{range .items[*]}{.apiVersion}{"\n
do
service=$(echo "${line}" | cut -d. -f1)
provider=$(echo "${line}" | cut -d. -f2)
if [[ ${provider} == "upbound" ]]; then
if [ "${provider}" = "upbound" ]; then
# azure.upbound.io is an exception where apiVersion does not contain the service name
# we have those resources in the family package
provider="azure"
Expand All @@ -38,12 +38,12 @@ do
filename="sp-manual.yaml"
providername="${provider}-${sp}"

if [[ "${sp}" == "config" ]] || [[ "${sp}" == "azure" ]]; then
# azure.upbound.io is an exception where apiVersion does not contain the service name
# we have those resources in the family package
providername="family-$provider"
filename="sp-family-manual.yaml"
fi
if [ "${sp}" = "config" ] || [ "${sp}" = "azure" ]; then
# azure.upbound.io is an exception where apiVersion does not contain the service name
# we have those resources in the family package
providername="family-$provider"
filename="sp-family-manual.yaml"
fi
if ! cat "${filename}" | grep provider-${providername}:${version} > /dev/null; then
echo "apiVersion: pkg.crossplane.io/v1
kind: Provider
Expand All @@ -58,22 +58,22 @@ spec:
done
```

4. Install config providers with `revisionActivationPolicy: Manual`:
4. Install family providers with `revisionActivationPolicy: Manual`:
Copy link
Member Author

Choose a reason for hiding this comment

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

Having duplicated steps across two guides is bugging me.
@ezgidemirel do you see a way to combine them?

Copy link
Member

Choose a reason for hiding this comment

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

we can mark some of the steps as configuration only but I think it will make things more complicated for the user.



Verify that `sp-config-manual.yaml` files are generated with the correct content
Verify that `sp-family-manual.yaml` files are generated with the correct content

```bash
cat sp-config-manual.yaml
cat sp-family-manual.yaml
```

Install the config provider(s)
Install the family provider(s)

```bash
kubectl apply -f sp-config-manual.yaml
kubectl apply -f sp-family-manual.yaml
```

Make sure the config provider(s) are in `Installed: False` and `Healthy: True` state:
Make sure the family provider(s) are in `Installed: False` and `Healthy: True` state:

```bash
kubectl get providers.pkg
Expand All @@ -88,7 +88,7 @@ Verify that `sp-manual.yaml` files are generated with the correct content
cat sp-manual.yaml
```

Install the config provider
Install the smallers providers

```bash
kubectl apply -f sp-manual.yaml
Expand All @@ -109,9 +109,9 @@ kubectl delete provider.pkg $PROVIDER_NAME
7. Update smaller providers with `revisionActivationPolicy:Automatic`:

```bash
sed 's/revisionActivationPolicy: Manual/revisionActivationPolicy: Automatic/' sp-config-manual.yaml > sp-config-automatic.yaml
sed 's/revisionActivationPolicy: Manual/revisionActivationPolicy: Automatic/' sp-family-manual.yaml > sp-family-automatic.yaml

kubectl apply -f sp-config-automatic.yaml
kubectl apply -f sp-family-automatic.yaml
```


Expand Down