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

yaml formatting & indentation #26

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
18 changes: 9 additions & 9 deletions site-src/api-types/cluster-set.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,37 +20,37 @@ This property can be used to:

- uniquely identify clusters using a clusterID

```
```yaml
apiVersion: about.k8s.io/v1
kind: ClusterProperty
metadata:
name: cluster.clusterset.k8s.io
name: cluster.clusterset.k8s.io
spec:
value: cluster-1
value: cluster-1
```

- uniquely identify the membership of a cluster in a ClusterSet for the lifetime of the membership.

```
```yaml
apiVersion: about.k8s.io/v1
kind: ClusterProperty
metadata:
name: clusterset.k8s.io
name: clusterset.k8s.io
spec:
value: mycoolclusterset
value: mycoolclusterset
```

- Provide a reference point for multi-cluster tooling to build on within a cluster set, for example for DNS labels, for logging and tracing, etc.

- Provide extra metadata space to store other cluster properties that might otherwise be implemented as ad-hoc annotations on semantically adjacent objects.

```
```yaml
apiVersion: about.k8s.io/v1
kind: ClusterProperty
metadata:
name: fingerprint.mycoolimplementation.com
name: fingerprint.mycoolimplementation.com
spec:
value: '{"major": "1","minor": "18","gitVersion": "v1.18.2","gitCommit": "52c56ce7a8272c798dbc29846288d7cd9fbae032","gitTreeState": "clean","buildDate": "2020-04-30T20:19:45Z","goVersion": "go1.13.9","compiler": "gc","platform": "linux/amd64"}'
value: '{"major": "1","minor": "18","gitVersion": "v1.18.2","gitCommit": "52c56ce7a8272c798dbc29846288d7cd9fbae032","gitTreeState": "clean","buildDate": "2020-04-30T20:19:45Z","goVersion": "go1.13.9","compiler": "gc","platform": "linux/amd64"}'
```


Expand Down
2 changes: 1 addition & 1 deletion site-src/concepts/about-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ The ClusterProperty CRD is proposed to give a Kubernetes-native way of identifyi

### Example

```
```yaml
apiVersion: about.k8s.io/v1
kind: ClusterProperty
metadata:
Expand Down
40 changes: 20 additions & 20 deletions site-src/concepts/cluster-profile-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,29 +34,29 @@ a [ClusterSet](../api-types/cluster-set.md). A cluster inventory is considered a
apiVersion: multicluster.x-k8s.io/v1alpha1
kind: ClusterProfile
metadata:
name: some-cluster-name
namespace: fleet-system
labels:
x-k8s.io/cluster-manager: some-cluster-manager
name: some-cluster-name
namespace: fleet-system
labels:
x-k8s.io/cluster-manager: some-cluster-manager
spec:
displayName: some-cluster
clusterManager:
name: some-cluster-manager
status:
version:
kubernetes: 1.28.0
properties:
- name: clusterset.k8s.io
value: some-clusterset
- name: location
value: apac
conditions:
- type: ControlPlaneHealthy
status: True
lastTransitionTime: "2023-05-08T07:56:55Z"
message: ""
- type: Joined
status: True
lastTransitionTime: "2023-05-08T07:58:55Z"
message: ""
version:
kubernetes: 1.28.0
properties:
- name: clusterset.k8s.io
value: some-clusterset
- name: location
value: apac
conditions:
- type: ControlPlaneHealthy
status: True
lastTransitionTime: "2023-05-08T07:56:55Z"
message: ""
- type: Joined
status: True
lastTransitionTime: "2023-05-08T07:58:55Z"
message: ""
```
26 changes: 13 additions & 13 deletions site-src/concepts/work-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,23 @@ Update of a Work will trigger the resource update on the Managed Cluster, and de

## Example

```
```yaml
apiVersion: multicluster.x-k8s.io/v1alpha1
kind: Work
metadata:
name: work-sample
namespace: cluster1
name: work-sample
namespace: cluster1
spec:
workload:
manifests:
- apiVersion: v1
kind: ConfigMap
metadata:
name: cm
namespace: default
data:
ui.properties: |
color=purple
workload:
manifests:
- apiVersion: v1
kind: ConfigMap
metadata:
name: cm
namespace: default
data:
ui.properties: |
color=purple
```

User creates a Work in the `cluster1` namespace on the Work Hub that the Work Controller is authorized to access.
Expand Down
46 changes: 23 additions & 23 deletions site-src/guides/coredns.md
Original file line number Diff line number Diff line change
Expand Up @@ -265,30 +265,30 @@ cat <<EOF > dnsutils.yaml
apiVersion: v1
kind: Pod
metadata:
name: dnsutils
namespace: demo
name: dnsutils
namespace: demo
spec:
containers:
- name: dnsutils
image: k8s.gcr.io/e2e-test-images/jessie-dnsutils:1.3
command:
- sleep
- "3600"
imagePullPolicy: IfNotPresent
restartPolicy: Always
EOF
```

```
kubectl apply -f dnsutils.yaml
```

You can then use the `dnsutils` pod to confirm that the DNS query for the ServiceImport responds with the IP set in the fake ServiceImport previously defined.

```
kubectl exec -it dnsutils -n demo -- bash
```
```
containers:
- name: dnsutils
image: k8s.gcr.io/e2e-test-images/jessie-dnsutils:1.3
command:
- sleep
- "3600"
imagePullPolicy: IfNotPresent
restartPolicy: Always
EOF
```

```
kubectl apply -f dnsutils.yaml
```

You can then use the `dnsutils` pod to confirm that the DNS query for the ServiceImport responds with the IP set in the fake ServiceImport previously defined.

```
kubectl exec -it dnsutils -n demo -- bash
```
```
root@dnsutils:/# nslookup myservice.demo.svc.clusterset.local
```
**Output (Do Not Copy)**
Expand Down