github.com/wmuizelaar/kpt@v0.0.0-20221018115725-bd564717b2ed/package-examples/cert-manager-basic/README.md (about) 1 # cert-manager-basic 2 3 ## Description 4 5 CertManager kpt package. 6 7 ## Usage 8 9 ### Fetch the package 10 11 ```sh 12 kpt pkg get git@github.com/googlecontainertools/kpt.git/package-examples/cert-manager-basic[@VERSION] cert-manager-basic 13 ``` 14 15 ### View package content 16 17 ```sh 18 kpt pkg tree cert-manager-basic 19 ``` 20 21 ### Apply the package 22 23 ```sh 24 kpt live init cert-manager-basic 25 kpt live apply cert-manager-basic --reconcile-timeout=2m --output=table 26 ``` 27 28 ### Steps used to create the package 29 30 ```sh 31 32 mkdir cert-manager-basic 33 kpt pkg init cert-manager-basic 34 35 # fetch the cert-manager uber yaml from the github release 36 wget https://github.com/cert-manager/cert-manager/releases/download/v1.8.2/cert-manager.yaml 37 38 ``` 39 40 Add the following labels to the `Namespace` resource because the next command 41 uses `labels` to determine the directory and filename of the resources. 42 43 ```yaml 44 labels: 45 app: 'cert-manager' 46 app.kubernetes.io/name: 'cert-manager' 47 app.kubernetes.io/instance: 'cert-manager' 48 # Generated labels 49 app.kubernetes.io/version: "v1.8.2" 50 ``` 51 52 ```sh 53 # split out the uber YAML into a component based directory structure. 54 55 kubectl-slice -f cert-manager.yaml --template '{{ index "app" .metadata.labels }}/{{.kind | lower}}-{{.metadata.name|dottodash}}.yaml' -o cert-manager-basic 56 ... 57 ... 58 46 files generated. 59 60 # Move the crds in a separate directory 61 # Generally CRDs will be generated by tools such as controller-gen and it helps 62 # to keep them separately from other resources. It will help us model our package 63 # authoring solution. 64 mkdir cert-manager-basic/crds 65 mv cert-manager-basic/cert-manager/customresourcedefinition-* cert-manager-basic/crds/ 66 ```