Closed gnuletik closed 1 year ago
How does the manifest that generates this diff look like?
I removed other resources to only keep the API:
kustomization.yml
namespace: my-app
commonLabels:
app.kubernetes.io/part-of: my-app
resources:
- api.yml
api.yml
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: my-app-api
namespace: default
labels:
app: my-app-api
app.kubernetes.io/name: my-app-api
app.kubernetes.io/part-of: my-app
spec:
replicas: 2
minReadySeconds: 5
strategy:
type: RollingUpdate
selector:
matchLabels:
app: my-app-api
template:
metadata:
labels:
app: my-app-api
app.kubernetes.io/name: my-app-api
app.kubernetes.io/part-of: my-app
annotations:
some-annotation: 'content'
spec:
serviceAccountName: something
terminationGracePeriodSeconds: 10
imagePullSecrets:
- name: dockerhub
containers:
- name: my-app-api
image: company/my-app/api
resources:
requests:
memory: 500Mi
cpu: 0.1
limits:
memory: 500Mi
cpu: 0.2
env:
- name: ENV
valueFrom:
configMapKeyRef:
name: my-app
key: env
ports:
- containerPort: 8000
name: http
livenessProbe:
httpGet:
path: /health
port: http
timeoutSeconds: 3
startupProbe:
httpGet:
path: /health
port: http
timeoutSeconds: 3
periodSeconds: 5
failureThreshold: 15
---
apiVersion: v1
kind: Service
metadata:
name: my-app-api
namespace: default
labels:
app: my-app-api-svc
app.kubernetes.io/name: my-app-api-svc
app.kubernetes.io/part-of: my-app
spec:
selector:
app: my-app-api
ports:
- protocol: TCP
port: 80
targetPort: http
I can not reproduce this. Repeatedly applying the resources based on the provided manifests does not show any diffs.
When running
terraform apply
, each of the resources without annotations show a diff from an empty annotations to null.Setting
commonAnnotations: {}
insidekustomization.yml
give the same result.I currently set an annotation to avoid this but I'm wondering if the terrafirn provider should ignore this change?
Thanks!