mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-06 19:52:42 +00:00
Even with build error, kubectl apply should apply all valid resources
This commit is contained in:
12
hack/testdata/multi-resource-2.yaml
vendored
Normal file
12
hack/testdata/multi-resource-2.yaml
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
# Simple test that errors should not block apply of valid
|
||||
# resources. The ConfigMap should successfully apply, while
|
||||
# the custom resource fails because the CRD is missing.
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: foo
|
||||
---
|
||||
apiVersion: example.com/v1
|
||||
kind: Bogus
|
||||
metadata:
|
||||
name: foo
|
30
hack/testdata/multi-resource-3.yaml
vendored
Normal file
30
hack/testdata/multi-resource-3.yaml
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
# Test failures do not block the apply for valid resources.
|
||||
# pod-a and pod-c should apply, while POD-B is invalid
|
||||
# because of the capitialization.
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
name: pod-a
|
||||
spec:
|
||||
containers:
|
||||
- name: kubernetes-pause
|
||||
image: k8s.gcr.io/pause:2.0
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
name: POD-B
|
||||
spec:
|
||||
containers:
|
||||
- name: kubernetes-pause
|
||||
image: k8s.gcr.io/pause:2.0
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
name: pod-c
|
||||
spec:
|
||||
containers:
|
||||
- name: kubernetes-pause
|
||||
image: k8s.gcr.io/pause:2.0
|
||||
|
20
hack/testdata/multi-resource-4.yaml
vendored
Normal file
20
hack/testdata/multi-resource-4.yaml
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
# Tests that initial failures to not block subsequent applies.
|
||||
# Initial apply for Widget fails, since CRD is not applied yet,
|
||||
# but the CRD apply should succeed. Subsequent custom resource
|
||||
# apply of Widget should succeed.
|
||||
apiVersion: example.com/v1
|
||||
kind: Widget
|
||||
metadata:
|
||||
name: foo
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1beta1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
name: widgets.example.com
|
||||
spec:
|
||||
group: example.com
|
||||
version: v1
|
||||
scope: Namespaced
|
||||
names:
|
||||
plural: widgets
|
||||
kind: Widget
|
Reference in New Issue
Block a user