diff --git a/docs/api-reference/kustomization/commonannotations/index.html b/docs/api-reference/kustomization/commonannotations/index.html index ae0266850..7f610dc08 100644 --- a/docs/api-reference/kustomization/commonannotations/index.html +++ b/docs/api-reference/kustomization/commonannotations/index.html @@ -667,6 +667,17 @@ + + @@ -712,12 +723,40 @@
Add annotations (non-identifying metadata) to all resources. These are key value pairs.
+Add annotations to all resources. If the annotation key already is present on the resource, +the value will be overridden.
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
commonAnnotations:
oncallPager: 800-555-1212
+# kustomization.yaml
+apiVersion: kustomize.config.k8s.io/v1beta1
+kind: Kustomization
+
+commonAnnotations:
+ oncallPager: 800-555-1212
+
+resources:
+- deploy.yaml
+# deploy.yaml
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ name: example
+spec:
+ ...
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ name: example
+ annotations:
+ oncallPager: 800-555-1212
+spec:
+ ...
Add labels and selectors to all resources.
+Add labels and selectors to all resources. If the label key already is present on the resource, +the value will be overridden.
+ + +Selectors for resources such as Deployments and Services shouldn’t be changed once the +resource has been applied to a cluster.
+Changing commonLabels to live resources could result in failures.
+ +apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
@@ -720,6 +741,65 @@
someName: someValue
owner: alice
app: bingo
+# kustomization.yaml
+apiVersion: kustomize.config.k8s.io/v1beta1
+kind: Kustomization
+
+commonLabels:
+ someName: someValue
+ owner: alice
+ app: bingo
+
+resources:
+- deploy.yaml
+- service.yaml
+# deploy.yaml
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ name: example
+# service.yaml
+apiVersion: v1
+kind: Service
+metadata:
+ name: example
+apiVersion: v1
+kind: Service
+metadata:
+ labels:
+ app: bingo
+ owner: alice
+ someName: someValue
+ name: example
+spec:
+ selector:
+ app: bingo
+ owner: alice
+ someName: someValue
+---
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ labels:
+ app: bingo
+ owner: alice
+ someName: someValue
+ name: example
+spec:
+ selector:
+ matchLabels:
+ app: bingo
+ owner: alice
+ someName: someValue
+ template:
+ metadata:
+ labels:
+ app: bingo
+ owner: alice
+ someName: someValue
Each entry in this list should resolve to patch object, which includes a patch and a target selector. -The patch can be either a strategic merge patch or a JSON patch. It can be either a patch file, or an inline -string. The target selects resources by group, version, kind, name, namespace, labelSelector and -annotationSelector. Any resource which matches all the specified fields has the patch applied.
+Patches (also call overlays) add or override fields on resources. They are provided using the
+patches Kustomization field.
The patches field contains a list of patches to be applied in the order they are specified.
Each patch may:
+The patch target selects resources by group, version, kind, name, namespace, labelSelector and +annotationSelector. Any resource which matches all the specified fields has the patch applied +to it (regular expressions).
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
@@ -793,7 +801,7 @@ is equivalent to ^myapp$.
- Last modified June 7, 2020: Convert docs to docsy (42497c66)
+ Last modified June 11, 2020: kustomize docs tweaks (6c540986)
diff --git a/docs/contributing/docs/index.html b/docs/contributing/docs/index.html
index 30610f484..16b9b9c20 100644
--- a/docs/contributing/docs/index.html
+++ b/docs/contributing/docs/index.html
@@ -350,6 +350,12 @@
Prerequisites
Development
Publishing
+ Publishing docs to your kustomize fork
+
+
@@ -400,17 +406,17 @@ forked from the docsy-example<
Development
-The docs are in the site directory
+The doc input files are in the site directory. The site can be hosted locally using
+hugo serve.
cd site/
-
To view the docs run
-hugo serve
+hugo serve
...
Running in Fast Render Mode. For full rebuilds on change: hugo server --disableFastRender
Web Server is available at http://localhost:1313/kustomize/ (bind address 127.0.0.1)
-
and visit the URL that is printed
-Publishing
-The site content is compiled by Hugo into the docs folder using the hugo command:
-hugo
+
Publishing
+Hugo compiles the files under site Hugo into html which it puts in the docs folder:
+cd site/
+hugo
| EN
-------------------+-----
Pages | 99
@@ -421,7 +427,38 @@ Web Server is available at http://localhost:1313/kustomize/ | 2
Sitemaps | 1
Cleaned | 0
-
Add the site and docs folders to a commit, and create a PR.
+Add the site/ and docs/ folders to a commit, then create a PR.
It is possible to have the kustomize docs published to your forks github pages.
+Changes must be pushed to the fork’s master branch to be served as the fork’s GitHub Page.
+ +site/contenthugo from the site/ directorysite and docs directories to the master branch