kubediff
kubediff copied to clipboard
Add end to end test
Bring up a kind cluster, apply manifests, do cluster-local change, confirm drift using kubediff
.
Potentially re-use some of the work from kured
:
- https://github.com/weaveworks/kured/blob/main/.github/workflows/on-pr.yaml#L93
- https://github.com/weaveworks/kured/tree/main/tests/kind
Tested https://github.com/helm/kind-action in a personal repository. We will add to the solution ASAP
@dholbach
I'm going to apply the following changes in a first stage. Then I will improve with different scenarios. I think this is going to be a long one 🤣
apiVersion: apps/v1
kind: Deployment
metadata:
name: kubediff-app
spec:
replicas: 1
revisionHistoryLimit: 3
selector:
matchLabels:
app: kubediff-app
template:
metadata:
labels:
app: kubediff-app
spec:
containers:
- command:
- sleep
- infinity
image: busybox
name: kubediff-app
resources:
limits:
cpu: 100m
memory: 100Mi
requests:
cpu: 100m
memory: 100Mi
Change replicas to 3
Run kubediff
Get
## kubediff/kubediff-app (Deployment.v1.apps)
.spec.replicas: '1' != '3'
and
{
"deployment.yaml": [
".spec.replicas: '1' != '3'"
]
}