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

docs: fix doc typos #846

Merged
merged 2 commits into from
Jun 7, 2024
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
10 changes: 5 additions & 5 deletions hack/Azure/setup/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ If you would like to add a prometheus server to access metrics, run the followin
additionalScrapeConfigs:
- job_name: "fleet"
static_configs:
- targets: [<EXTERNAL-IP>:8080"]
- targets: ["<EXTERNAL-IP>:8080"]
```
Replace `<EXTERNAL-IP>` with the external IP address obtained previously.
</details>
Expand Down Expand Up @@ -109,15 +109,15 @@ These labels can then be used for targeting specific clusters in resource placem
run the commands below:

```sh
# Replace the values of <MEMBER_CLUSTER>, <LABEL_KEY>, and <LABEL_VALUE> with those of your own.
export MEMBER_CLUSTER=<YOUR-MEMBER-CLUSTER<
export LABEL_KEY=YOUR-<LABEL-KEY>
# Replace the values of <YOUR-MEMBER_CLUSTER>, <YOUR-LABEL_KEY>, and <YOUR-LABEL_VALUE> with those of your own.
export MEMBER_CLUSTER=<YOUR-MEMBER-CLUSTER>
export LABEL_KEY=<YOUR-LABEL-KEY>
export LABEL_VALUE=<YOUR-LABEL-VALUE>
kubectl label membercluster $MEMBER_CLUSTER $LABEL_KEY=$LABEL_VALUE
```

Or, you can add the same label to multiple clusters at once by running the following script:
```
```sh
# Replace the value <number-of-member-cluster> to the desired number of member clusters you want to label.
chmod +x hack/Azure/setup/labelMC.sh
./hack/Azure/setup/labelMC.sh $LABEL_KEY=$LABEL_VALUE <number-of-member-clusters>
Expand Down
8 changes: 4 additions & 4 deletions hack/Azure/setup/joinMC.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# CAN ONLY BE RUN AFTER CREATING NEEDED AKS CLUSTERS AND HUB CLUSTER. This script creates member clusters from
# AKS Cluster's and joins them onto the hub cluster.

export HUB_CLUSTER=$1
export HUB_CLUSTER="$1"
export HUB_CLUSTER_CONTEXT=$(kubectl config view -o jsonpath="{.contexts[?(@.context.cluster==\"$HUB_CLUSTER\")].name}")
export HUB_CLUSTER_ADDRESS=$(kubectl config view -o jsonpath="{.clusters[?(@.name==\"$HUB_CLUSTER\")].cluster.server}")

for MC in "${@:2}"; do

# Note that Fleet will recognize your cluster with this name once it joins.
export MEMBER_CLUSTER=${MC}
export MEMBER_CLUSTER_CONTEXT=${MC}
export MEMBER_CLUSTER=$(kubectl config view -o jsonpath="{.contexts[?(@.context.cluster==\"$MC\")].name}")
export MEMBER_CLUSTER_CONTEXT=$(kubectl config view -o jsonpath="{.contexts[?(@.context.cluster==\"$MC\")].name}")

export SERVICE_ACCOUNT="$MEMBER_CLUSTER-hub-cluster-access"

Expand Down Expand Up @@ -37,7 +37,7 @@ type: kubernetes.io/service-account-token
EOF

echo "Creating member cluster..."
export TOKEN=$(kubectl get secret $SERVICE_ACCOUNT_SECRET -n fleet-system -o jsonpath='{.data.token}' | base64 -d)
export TOKEN="$(kubectl get secret $SERVICE_ACCOUNT_SECRET -n fleet-system -o jsonpath='{.data.token}' | base64 --decode)"
cat <<EOF | kubectl apply -f -
apiVersion: cluster.kubernetes-fleet.io/v1beta1
kind: MemberCluster
Expand Down
Loading