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

Fix markdownlint issues #15

Merged
merged 1 commit into from
Mar 28, 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
7 changes: 4 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ GitHub pull requests.
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->

- [Certificate of Origin](#certificate-of-origin)
- [Git commit Sign-off](#git-commit-sign-off)
- [Git commit Sign-off](#git-commit-sign-off)

<!-- END doctoc generated TOC please keep comment here to allow auto update -->

Expand All @@ -26,8 +26,9 @@ Commit message should contain signed off section with full name and email. For e
Signed-off-by: John Doe <[email protected]>
```

When making commits, include the `-s` flag and `Signed-off-by` section will be automatically
added to your commit message. If you want GPG signing too, add the `-S` flag alongside `-s`.
When making commits, include the `-s` flag and `Signed-off-by` section will be
automatically added to your commit message. If you want GPG signing too, add
the `-S` flag alongside `-s`.

```bash
# Signing off commit
Expand Down
32 changes: 20 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ I'll use a self-signed certificate, you may want to sign it with some
authority, e.g. using built-in Kubernetes facilities.

```bash
openssl req -x509 -new -subj "/CN=ironic.test.svc" -addext "subjectAltName = DNS:ironic.test.svc" \
-newkey ec -pkeyopt ec_paramgen_curve:secp384r1 -nodes -keyout tls.key -out tls.crt
openssl req -x509 -new -subj "/CN=ironic.test.svc" -addext \
"subjectAltName = DNS:ironic.test.svc" -newkey ec -pkeyopt \
ec_paramgen_curve:secp384r1 -nodes -keyout tls.key -out tls.crt
kubectl create secret tls ironic-tls -n test --key="tls.key" --cert="tls.crt"
```

Expand All @@ -41,13 +42,13 @@ spec:
ramdiskSSHKey: "<YOUR SSH PUBLIC KEY HERE>"
```

```
$ kubectl create -f ironic.yaml
```bash
kubectl create -f ironic.yaml
```

After some time, you can check the outcome:

```
```bash
$ kubectl describe ironic -n test ironic
...
Status:
Expand All @@ -69,7 +70,7 @@ Status:
Now you can see the service that can be used to access Ironic (it has the same
name as the Ironic object):

```
```bash
$ kubectl get service -n test ironic
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
ironic ClusterIP 10.96.107.239 <none> 443/TCP 156m
Expand All @@ -78,23 +79,30 @@ $ curl -k https://10.96.107.239/
```

The autogenerated credentials secret is linked in the spec:
```
$ IRONIC_SECRET=$(kubectl get ironic -n test ironic -o jsonpath='{.spec.credentialsRef.name}')
$ IRONIC_USER=$(kubectl get secret -n test "$IRONIC_SECRET" -o jsonpath="{.data.username}" | base64 --decode)
$ IRONIC_PASSWORD=$(kubectl get secret -n test "$IRONIC_SECRET" -o jsonpath="{.data.password}" | base64 --decode)

```bash
$ IRONIC_SECRET=$(kubectl get ironic -n test ironic -o \
jsonpath='{.spec.credentialsRef.name}')
$ IRONIC_USER=$(kubectl get secret -n test "$IRONIC_SECRET" -o \
jsonpath="{.data.username}" | base64 --decode)
$ IRONIC_PASSWORD=$(kubectl get secret -n test "$IRONIC_SECRET" -o \
jsonpath="{.data.password}" | base64 --decode)
$ # From inside the cluster, accessing an authenticated endpoint:
$ curl -k -u "$IRONIC_USER:$IRONIC_PASSWORD" https://10.96.107.239/v1/drivers
```

By its nature, Ironic listens on a host network and thus is reachable on one of
the Kubernetes nodes, even from the outside (note the port):

```
$ kubectl get pod -n test -l metal3.io/ironic-standalone-operator=ironic-service -o wide
<!-- markdownlint-disable MD013 -->
```bash
$ kubectl get pod -n test -l \
metal3.io/ironic-standalone-operator=ironic-service -o wide
NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES
ironic-service-698899755d-6xzxl 4/4 Running 0 152m 10.89.0.2 kind-control-plane <none> <none>
$ curl -k -u "$IRONIC_USER:$IRONIC_PASSWORD" https://10.89.0.2:6385/v1/drivers
```
<!-- markdownlint-enable MD013 -->

[bmo]: https://github.com/metal3-io/baremetal-operator

Expand Down
Loading