Skip to content

Commit d966cc7

Browse files
authored
Merge pull request #120 from phisco/update_docs
docs: switch to crossplane-system namespace everywhere for consistency
2 parents 4b05bd0 + 83e6005 commit d966cc7

File tree

6 files changed

+35
-12
lines changed

6 files changed

+35
-12
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ cobertura:
8585

8686
# ====================================================================================
8787
# End to End Testing
88-
CROSSPLANE_NAMESPACE = upbound-system
88+
CROSSPLANE_NAMESPACE = crossplane-system
8989
-include build/makelib/local.xpkg.mk
9090
-include build/makelib/controlplane.mk
9191

@@ -99,7 +99,7 @@ local-dev: controlplane.up
9999
local-deploy: build controlplane.up local.xpkg.deploy.provider.$(PROJECT_NAME)
100100
@$(INFO) running locally built provider
101101
@$(KUBECTL) wait provider.pkg $(PROJECT_NAME) --for condition=Healthy --timeout 5m
102-
@$(KUBECTL) -n upbound-system wait --for=condition=Available deployment --all --timeout=5m
102+
@$(KUBECTL) -n $(CROSSPLANE_NAMESPACE) wait --for=condition=Available deployment --all --timeout=5m
103103
@$(OK) running locally built provider
104104

105105
e2e: local-deploy uptest

README.md

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,22 +39,42 @@ make
3939
make local-dev
4040
```
4141

42-
Run controller against the cluster:
42+
Now you can either run the controller locally or in-cluster.
43+
44+
### Running locally
45+
46+
Run controller locally against the cluster:
4347

4448
```
4549
make run
4650
```
4751

48-
Since the controller is running outside the Kind cluster, you need to make api server accessible (on a separate terminal):
52+
Since the controller is running outside the Kind cluster, you need to make the
53+
API server accessible to the controller. You can do this by running a proxy:
4954

5055
```
56+
# on a separate terminal
5157
sudo kubectl proxy --port=8081
5258
```
5359

54-
### Testing in Local Cluster
60+
See [below](#required-configuration) for how to properly setup the RBAC for the
61+
locally running controller.
62+
63+
### Running in-cluster
64+
65+
Run controller in-cluster:
66+
67+
```
68+
make local-deploy
69+
```
70+
71+
See [below](#required-configuration) for how to properly setup the RBAC for the
72+
locally running controller.
73+
74+
### Required configuration
5575

5676
1. Prepare provider config for the local cluster:
57-
1. If provider kubernetes running in the cluster (e.g. provider installed with crossplane):
77+
1. If provider kubernetes running in the cluster (e.g. provider installed with crossplane or using `make local-deploy`):
5878

5979
```
6080
SA=$(kubectl -n crossplane-system get sa -o name | grep provider-kubernetes | sed -e 's|serviceaccount\/|crossplane-system:|g')
@@ -65,7 +85,7 @@ sudo kubectl proxy --port=8081
6585

6686
```
6787
KUBECONFIG=$(kind get kubeconfig --name local-dev | sed -e 's|server:\s*.*$|server: http://localhost:8081|g')
68-
kubectl -n crossplane-system create secret generic cluster-config --from-literal=kubeconfig="${KUBECONFIG}"
88+
kubectl -n crossplane-system create secret generic cluster-config --from-literal=kubeconfig="${KUBECONFIG}"
6989
kubectl apply -f examples/provider/config.yaml
7090
```
7191

@@ -77,6 +97,8 @@ sudo kubectl proxy --port=8081
7797

7898
### Cleanup
7999

100+
To delete the local kind cluster:
101+
80102
```
81-
make local.down
103+
make controlplane.down
82104
```

build

cluster/test/setup.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ set -aeuo pipefail
44
echo "Running setup.sh"
55

66
echo "Creating the provider config with cluster admin permissions in cluster..."
7-
SA=$(${KUBECTL} -n upbound-system get sa -o name | grep provider-kubernetes | sed -e 's|serviceaccount\/|upbound-system:|g')
7+
SA=$(${KUBECTL} -n crossplane-system get sa -o name | grep provider-kubernetes | sed -e 's|serviceaccount\/|crossplane-system:|g')
88
${KUBECTL} create clusterrolebinding provider-kubernetes-admin-binding --clusterrole cluster-admin --serviceaccount="${SA}" --dry-run=client -o yaml | ${KUBECTL} apply -f -
99

1010
cat <<EOF | ${KUBECTL} apply -f -

examples/provider/config-in-cluster.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ metadata:
99
name: kubernetes-provider
1010
spec:
1111
credentials:
12-
source: InjectedIdentity
12+
source: InjectedIdentity

examples/provider/config.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,5 @@ spec:
2424
# secretRef:
2525
# name: gcp-credentials
2626
# namespace: crossplane-system
27-
# key: credentials.json
27+
# key: credentials.json
28+

0 commit comments

Comments
 (0)