Skip to content

Commit ca2a686

Browse files
committed
Docs: use Docsy alert shortcode for notes and warnings
Signed-off-by: Aravindhan Ayyanathan <aravindhan.a@est.tech>
1 parent 7919874 commit ca2a686

10 files changed

Lines changed: 34 additions & 39 deletions

File tree

documentation/assets/scss/_nav.scss

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
//
44

55
.td-navbar-cover {
6-
background: $primary;
6+
background: #fff;
77

88
@include media-breakpoint-up(md) {
99
background: transparent !important;
@@ -20,12 +20,12 @@
2020
}
2121

2222
.navbar-bg-onscroll {
23-
background: $primary !important;
23+
background: #fff !important;
2424
opacity: inherit;
2525
}
2626

2727
.td-navbar {
28-
background: $primary;
28+
background: #fff;
2929
min-height: 4rem;
3030
margin: 0;
3131
z-index: 32;

documentation/assets/scss/_variables_project.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ $kpt-blue: #00bbf9;
1616
$kpt-dark-pink: #a43e7b;
1717
$kpt-dark-blue: #0081ac;
1818

19-
$primary: #fff;
19+
$primary: $kpt-dark-blue;
2020

2121
$black: #000;
2222
$primary-300: #c53490;

documentation/content/en/book/04-using-functions/_index.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -253,8 +253,9 @@ pipeline:
253253
- exec: "sed -e 's/foo/bar/'"
254254
```
255255

256-
Note:
256+
{{% alert title="Note" color="primary" %}}
257257
You must render the package by allowing the executables. To do this, specify the `--allow-exec` command line flag, as shown below:
258+
{{% /alert %}}
258259

259260
```shell
260261
kpt fn render [PKG_DIR] --allow-exec
@@ -509,9 +510,10 @@ Package "wordpress":
509510
Successfully executed 5 function(s) in 2 package(s).
510511
```
511512

512-
Note:
513+
{{% alert title="Note" color="primary" %}}
513514
The `ensure-name-substring` function is applied only to the
514515
resources matching the selection criteria.
516+
{{% /alert %}}
515517

516518
If you have resources with particular labels or annotations that you want to use to select your resources, then you can use them. Here, for example, is a function that is only applied to the resources matching the label `foo: bar`:
517519

@@ -672,8 +674,9 @@ Many functions take a `functionConfig` of the kind `ConfigMap`, since they only
672674
kpt fn eval wordpress -i set-namespace:latest -- namespace=mywordpress
673675
```
674676

675-
Note:
677+
{{% alert title="Note" color="primary" %}}
676678
The arguments must come after the separator `--`.
679+
{{% /alert %}}
677680

678681
### Specifying `selectors`
679682

@@ -747,8 +750,9 @@ The `kubeconform` function can, for example, consume a JSON schema file, as foll
747750
kpt fn eval -i kubeconform:latest --mount type=bind,src="/path/to/schema-dir",dst=/schema-dir --as-current-user wordpress -- schema_location=file:///schema-dir
748751
```
749752

750-
Note:
753+
{{% alert title="Note" color="primary" %}}
751754
The `--as-current-user` flag may be required to run the function as your uid, instead of the default `nobody`, to access the host filesystem.
755+
{{% /alert %}}
752756

753757
All the volumes are mounted as _readonly_ by default. To mount volumes in _read-write_ mode, specify `rw=true`, as follows:
754758

documentation/content/en/book/06-deploying-packages/_index.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,9 @@ resources in `wordpress` package are in the `default` namespace, so it chooses
121121
and namespace of the `ResourceGroup` resource. Refer to the
122122
[init command reference]({{% relref "/reference/cli/live/init" %}}) for usage.
123123

124-
{{< warning type=warning >}}
124+
{{% alert title="Warning" color="warning" %}}
125125
Once a package is applied to the cluster, do not change the `ResourceGroup` CR. Doing so corrupts the association between the package and the inventory in the cluster, possibly leading to unpredictable and destructive operations.
126-
{{< /warning >}}
126+
{{% /alert %}}
127127

128128
## Applying a Package
129129

@@ -135,9 +135,9 @@ Let's create that first:
135135
```shell
136136
kubectl create secret generic mysql-pass --from-literal=password=YOUR_PASSWORD
137137
```
138-
{{< warning type=info >}}
138+
{{% alert title="Note" color="primary" %}}
139139
You can also declare the `Secret` resource, but make sure it is not committed to Git as part of the package.
140-
{{< /warning >}}
140+
{{% /alert %}}
141141

142142
Then deploy the package and wait for the resources to be reconciled:
143143

@@ -179,10 +179,10 @@ running `kpt live apply`:
179179
kpt live install-resource-group
180180
```
181181

182-
{{< warning type=info >}}
182+
{{% alert title="Note" color="primary" %}}
183183
Installing this CRD requires sufficient ClusterRole permission, so you may
184184
need to ask your cluster admin to install it for you.
185-
{{< /warning >}}
185+
{{% /alert %}}
186186

187187
### Server-side vs Client-side apply
188188

documentation/content/en/guides/3-way-merge.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,9 @@ Replaces your entire local package with upstream, discarding all local changes.
103103

104104
**When to use**: Only when you intentionally want to discard all customizations
105105

106-
**Warning**: This strategy will **lose all your local modifications**. Use with caution.
106+
{{% alert title="Warning" color="warning" %}}
107+
This strategy will **lose all your local modifications**. Use with caution.
108+
{{% /alert %}}
107109

108110
For complete strategy details and examples, see the [update command reference]({{% relref "/reference/cli/pkg/update" %}}).
109111

documentation/content/en/guides/namespace-provisioning-cli.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,10 +211,12 @@ Package "tenant":
211211
Successfully executed 1 function(s) in 1 package(s).
212212
```
213213

214-
Note: if you are curious about how KRM functions are implemented. Take a look
214+
{{% alert title="Note" color="primary" %}}
215+
If you are curious about how KRM functions are implemented, take a look
215216
at [set-namespace code](https://github.com/kptdev/krm-functions-catalog/blob/main/functions/go/set-namespace/transformer/namespace.go)
216217
to get a feel for the implementation. You can also check out [Chapter 5: Developing Functions](/book/05-developing-functions/)
217218
of the kpt book.
219+
{{% /alert %}}
218220

219221
### Permissions
220222

documentation/content/en/guides/tenant-onboarding.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# Tenant onboarding
22

3-
{{< warning type=warning >}}
3+
{{% alert title="Warning" color="warning" %}}
44
This guide is a work in progress and may not fully reflect the
55
current state of kpt. It is due for a rewrite.
6-
{{< /warning >}}
6+
{{% /alert %}}
77

88
We have seen that in large organizations using kubernetes, there is a platform
99
team (or infrastructure team) that is responsible for managing the kubernetes
@@ -14,8 +14,10 @@ learn - how you can use kpt to address the tenant use-case. Though this guide
1414
focuses on the tenant use-case, the pattern for package workflow discussed here
1515
can be applied to other use cases as well.
1616

17-
**Note:** This guide is inspired by the [kube-common-setup](https://github.com/nghnam/kube-common-setup)
17+
{{% alert title="Note" color="primary" %}}
18+
This guide is inspired by the [kube-common-setup](https://github.com/nghnam/kube-common-setup)
1819
helm chart.
20+
{{% /alert %}}
1921

2022
## Terminology
2123

documentation/content/en/installation/migration.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,8 +256,10 @@ git diff
256256
function definitions will be declared in `pipeline` section of Kptfile.
257257
Reference to function config is added via [configPath] option.
258258

259-
Note: This function modifies only the local package files and doesn’t make any
259+
{{% alert title="Note" color="primary" %}}
260+
This function modifies only the local package files and doesn’t make any
260261
changes to the resources in the live cluster.
262+
{{% /alert %}}
261263

262264
#### Manual portion of migration
263265

documentation/content/en/reference/cli/alpha/live/plan/_index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ description: >
1010
Output a plan for the changes that will happen when applying a package.
1111
-->
1212

13-
{{< warning type=warning >}}
13+
{{% alert title="Warning" color="warning" %}}
1414
This feature is still in alpha, so the output format is subject to change.
15-
{{< /warning >}}
15+
{{% /alert %}}
1616

1717
`plan` does a dry-run of applying a package to the cluster. It outputs the results
1818
in combination with a diff for every resource that will be updated, which gives an

documentation/layouts/shortcodes/warning.html

Lines changed: 0 additions & 17 deletions
This file was deleted.

0 commit comments

Comments
 (0)