Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Helm Template Changes #446

Merged
merged 3 commits into from
May 20, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
## Bug Fixes

* [#429](https://github.com/suse-edge/edge-image-builder/issues/429) - Automatically set execute bit on scripts
* [#442](https://github.com/suse-edge/edge-image-builder/issues/442) - Only get images from specific Kubernetes objects

---

Expand Down
16 changes: 16 additions & 0 deletions pkg/registry/manifests.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"io"
"os"
"path/filepath"
"slices"
"strings"

"github.com/suse-edge/edge-image-builder/pkg/http"
Expand Down Expand Up @@ -85,6 +86,21 @@ func readManifest(manifestPath string) ([]map[string]any, error) {
}

func storeManifestImages(resource map[string]any, images map[string]bool) {
var k8sKinds = []string{
"Pod",
"Deployment",
"StatefulSet",
"DaemonSet",
"ReplicaSet",
"Job",
"CronJob",
}

kind, _ := resource["kind"].(string)
if !slices.Contains(k8sKinds, kind) {
return
}

var findImages func(data any)

findImages = func(data any) {
Expand Down
2 changes: 1 addition & 1 deletion pkg/registry/testdata/sample-crd.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apiVersion: "custom.example.com/v1"
kind: ComplexApplication
kind: Deployment
metadata:
name: my-complex-app
labels:
Expand Down