File: loadHttp.md

package info (click to toggle)
kustomize 5.8.0%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,608 kB
  • sloc: makefile: 162; sh: 123
file content (25 lines) | stat: -rw-r--r-- 624 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# load file from http

Resource and patch files could be loaded from http

<!-- @loadHttp -->
```sh
DEMO_HOME=$(mktemp -d)

cat <<EOF >$DEMO_HOME/kustomization.yaml
resources:
- https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/examples/helloWorld/configMap.yaml
EOF
```

<!-- @loadHttp -->
```sh
test 1 == \
  $(kustomize build $DEMO_HOME | grep "Good Morning!" | wc -l); \
  echo $?
```

Kustomize will try loading resource as a file either from local or http. If it
fails, try to load it as a directory or git repository.

Http load applies to patches as well. See full example in [loadHttp](loadHttp/).