From b51c2d1f1eab5f5e910a09fd959459f6a9f3b185 Mon Sep 17 00:00:00 2001 From: John Houston Date: Wed, 21 Dec 2022 23:51:15 -0500 Subject: [PATCH] strip generation from metadata (#55) --- CHANGELOG.md | 4 ++++ Makefile | 2 +- tfk8s.go | 1 + tfk8s_test.go | 1 + 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1ae41c6..bec3303 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +# 0.1.10 + +- Fix generation field not being stripped when using --strip + # 0.1.9 - Fix comma placement when formatting multi-line string values inside lists diff --git a/Makefile b/Makefile index 9a836da..3b03bae 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ .PHONY: build docker docker-push release install test clean -VERSION := 0.1.9 +VERSION := 0.1.10 DOCKER_IMAGE_NAME := jrhouston/tfk8s build: diff --git a/tfk8s.go b/tfk8s.go index c1b32b8..c0b907c 100644 --- a/tfk8s.go +++ b/tfk8s.go @@ -34,6 +34,7 @@ var ignoreMetadata = []string{ "uid", "managedFields", "finalizers", + "generation", } // ignoreAnnotations is the list of annotations to strip diff --git a/tfk8s_test.go b/tfk8s_test.go index 5b647ae..9ebe28a 100644 --- a/tfk8s_test.go +++ b/tfk8s_test.go @@ -297,6 +297,7 @@ metadata: resourceVersion: "677134" selfLink: /api/v1/namespaces/default/configmaps/test uid: bea6500b-0637-4d2d-b726-e0bda0b595dd + generation: 1 finalizers: - test`