Skip to content

Commit be562e7

Browse files
committed
Squashed 'examples/' changes from 37ba37b..5dfc652
5dfc652 update version references to: refs/tags/v0.0.5 1661a68 Updates for 1.27 (#62) 7216417 Remove PodSecurityPolicy examples (#59) a5709b6 update version references to: refs/tags/v0.0.4 bd819c7 Prepare for release of v0.0.4 (#61) d208442 test rerun 5b6816c Merge pull request #55 from eminalemdar/master b17cd9e updated kubeconform command for correcting the errors about Istio, PSP and CRDs f29c136 Merge pull request #51 from eminalemdar/api-version-updates 4c8bcdb Updated restricted PodSecurityPolicy example a6f2d88 Updated PodDisruptionBudget examples a2bdcd5 Updated EndpointSlice example 42dcf1d Updated Cron Job example 897a020 Merge pull request #48 from ContainerSolutions/custom-resource-definition 03d3d0d fix yamllint offences f47dd48 Add a CRD example f63018f Update RELEASE_PROCESS.md 1875537 Merge pull request #39 from kolja-lucht/kolja/ingress_networking_api_update 9ce140f Add new line to end of files 998c4ba Merge branch 'master' into kolja/ingress_networking_api_update d2b6ddd Merge pull request #47 from ContainerSolutions/pr42 04059dd Yaml lints aea771a Add README for VirtualServices 5958eb6 Examples for Istio VirtualService.networking.istio.io/v1beta1 9e8ca44 Ignore missing schemas c55be3e Merge pull request #43 from mt-inside/istio-destinationrule c1440bc Merge pull request #46 from ContainerSolutions/update 10f6564 Ingress and other schema update corrections 212803d Merge pull request #44 from ContainerSolutions/kubeconform 5b09f5a Merge pull request #45 from ContainerSolutions/remove-podpreset 64f8c22 removing PodPreset example ed31e7c changed error condition cbb7fb1 changed kubeval to kubeconform 5eb9183 Merge pull request #41 from shteou/patch-1 8e64c56 Add simple examples of DestinationRules f4817d5 fix: typo in pod's volume claimName 8923810 Upgrade networking api in ingress and use new syntax cdf024a Logo and release c1446f0 Release 1413a43 logo a0b1581 Merge pull request #36 from ContainerSolutions/feature-add-deployment-environment a3498cb Fix lint empty space error 5538109 Add Deployment example with environment variables git-subtree-dir: examples git-subtree-split: 5dfc652
1 parent 8a9ec23 commit be562e7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+903
-273
lines changed

.github/workflows/test.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,19 @@ jobs:
99
runs-on: ubuntu-latest
1010
steps:
1111
- uses: actions/checkout@v2
12-
- name: install kubeval
12+
- name: install kubeconform
1313
run: |
14-
curl -L https://github.com/instrumenta/kubeval/releases/latest/download/kubeval-linux-amd64.tar.gz | tar -zxf -
15-
sudo mv kubeval /usr/local/bin
14+
curl -L https://github.com/yannh/kubeconform/releases/latest/download/kubeconform-linux-amd64.tar.gz | tar -zxf -
15+
sudo mv kubeconform /usr/local/bin
16+
kubeconform -v
1617
- name: check all yaml
1718
run: |
18-
comm -3 <(find . | grep yaml$ | sort) <(cat .kubeval-ignore | sort) | xargs -n1 kubeval --strict | tee -a apply.txt
19+
./bin/test.sh | tee -a apply.txt
1920
- name: upload artifact
2021
uses: actions/upload-artifact@v2
2122
with:
2223
name: apply-test-all-yaml
2324
path: apply.txt
2425
- name: check apply log for error
2526
run: |
26-
if grep '^ERR' apply.txt; then exit 1; fi
27+
if [ -s apply.txt ]; then exit 1; fi

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# tgz archive for krew plugin
2+
examples.tar.gz
File renamed without changes.

.supported-k8s-versions

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
v1.19.0
2-
v1.18.0
3-
v1.17.0
4-
v1.16.0
5-
v1.15.0
1+
v1.27.0
2+
v1.26.0
3+
v1.25.0
4+
v1.24.0
5+
v1.23.0
6+
v1.22.0
7+
v1.21.0

.yamllint

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ yaml-files:
55
- '*.yml'
66
- '.yamllint'
77

8+
ignore: |
9+
.github/
10+
811
rules:
912
braces: enable
1013
brackets: enable

CronJob/simple.yaml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
11
---
22
# https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/
3-
apiVersion: batch/v1beta1
3+
apiVersion: batch/v1
44
kind: CronJob
55
metadata:
66
name: cronjob-simple
77
spec:
8-
schedule: "*/1 * * * *"
8+
schedule: "* * * * *"
99
jobTemplate:
1010
spec:
1111
template:
1212
spec:
1313
containers:
14-
- args:
14+
- command:
1515
- /bin/sh
1616
- -c
1717
- date; echo Hello from the Kubernetes cluster cronjob
18-
image: busybox
18+
image: busybox:1.28
19+
imagePullPolicy: IfNotPresent
1920
name: cronjob-simple-container
2021
restartPolicy: OnFailure
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
# https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/#create-a-customresourcedefinition
3+
apiVersion: apiextensions.k8s.io/v1
4+
kind: CustomResourceDefinition
5+
metadata:
6+
# name must match the spec fields below, and be in the form: <plural>.<group>
7+
name: crontabs.stable.example.com
8+
spec:
9+
# group name to use for REST API: /apis/<group>/<version>
10+
group: stable.example.com
11+
# list of versions supported by this CustomResourceDefinition
12+
versions:
13+
- name: v1
14+
# Each version can be enabled/disabled by Served flag.
15+
served: true
16+
# One and only one version must be marked as the storage version.
17+
storage: true
18+
schema:
19+
openAPIV3Schema:
20+
type: object
21+
properties:
22+
spec:
23+
type: object
24+
properties:
25+
cronSpec:
26+
type: string
27+
image:
28+
type: string
29+
replicas:
30+
type: integer
31+
# either Namespaced or Cluster
32+
scope: Namespaced
33+
names:
34+
# plural name to be used in the URL: /apis/<group>/<version>/<plural>
35+
plural: crontabs
36+
# singular name to be used as an alias on the CLI and for display
37+
singular: crontab
38+
# kind is normally the CamelCased singular type. Your resource manifests use this.
39+
kind: CronTab
40+
# shortNames allow shorter string to match your resource on the CLI
41+
shortNames:
42+
- ct
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
apiVersion: apps/v1
3+
kind: Deployment
4+
metadata:
5+
name: deployments-simple-deployment-with-environment-deployment
6+
spec:
7+
replicas: 2
8+
selector:
9+
matchLabels:
10+
app: deployments-simple-deployment-with-environment-app
11+
template:
12+
metadata:
13+
labels:
14+
app: deployments-simple-deployment-with-environment-app
15+
spec:
16+
containers:
17+
- name: busybox
18+
image: busybox
19+
command:
20+
- sleep
21+
- "3600"
22+
env:
23+
# Plain Text ENV
24+
- name: DEMO_GREETING
25+
value: "Hello from the environment"
26+
# Load from a secret
27+
- name: DATABASE_PASSWORD
28+
valueFrom:
29+
secretKeyRef:
30+
name: database_secrets
31+
key: password
32+
# Load from a configMap
33+
- name: KAFKA_TOPIC
34+
valueFrom:
35+
configMapKeyRef:
36+
name: kafka_config_map
37+
key: topic

Endpoints/endpoint-slice.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
# https://kubernetes.io/docs/concepts/services-networking/endpoint-slices/
3-
apiVersion: discovery.k8s.io/v1beta1
3+
apiVersion: discovery.k8s.io/v1
44
kind: EndpointSlice
55
metadata:
66
name: endpoint-slices
@@ -15,6 +15,5 @@ endpoints:
1515
conditions:
1616
ready: true
1717
hostname: pod-1
18-
topology:
19-
kubernetes.io/hostname: node-1
20-
topology.kubernetes.io/zone: us-west2-a
18+
nodeName: node-1
19+
zone: us-west2-a

Ingress/fanout.yaml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
apiVersion: networking.k8s.io/v1beta1
2+
apiVersion: networking.k8s.io/v1
33
kind: Ingress
44
metadata:
55
name: ingress-fanout
@@ -12,9 +12,15 @@ spec:
1212
paths:
1313
- path: /path1
1414
backend:
15-
serviceName: testsvc1
16-
servicePort: 4201
15+
service:
16+
name: testsvc1
17+
port:
18+
number: 4201
19+
pathType: exact
1720
- path: /path2
1821
backend:
19-
serviceName: testsvc2
20-
servicePort: 4202
22+
service:
23+
name: testsvc2
24+
port:
25+
number: 4202
26+
pathType: exact

0 commit comments

Comments
 (0)