carvel-dev / carvel-dev/kapp-controller

app cr downwardAPI should support parsing spec fields

Open
#1,342 3 comments 0 reactions 0 assignees View on GitHub
carvel-accepted enhancement
Dominant language
Go
Stars
323
Forks
127
Avg merge
2d 10h
Merged PRs (30d)
6

Description

**What steps did you take:**
Create an App CR and wanted to reference a image subPath of one of the fetched artifacts with:
```
template:
- ytt:
valuesFrom:
- downwardAPI:
items:
name: subpath
fieldPath: spec.fetch[?(@.image)].image.subPath
```

**What happened:**
I got:
```
Preparing template values: spec is not found
```

**What did you expect:**
I expected to get the subpath from proper resolution of downwarAPI.

**Anything else you would like to add:**
I've seen in the [detailed App spec](https://carvel.dev/kapp-controller/docs/v0.47.x/app-spec/) this comment:
```
# fieldPath accepts relaxed jsonpath to select metadata fields from the AppCR (name, namespace, uid, labels, annotations)
```

Related thread in k8s slack: https://kubernetes.slack.com/archives/CH8KCCKA5/p1696521588882029

**Environment:**

- kapp Controller version (execute `kubectl get deployment -n kapp-controller kapp-controller -o yaml` and the annotation is `kbld.k14s.io/images`): 0.48.0
- Kubernetes version (use `kubectl version`) 1.27

---
Vote on this request

This is an invitation to the community to vote on issues, to help us prioritize our backlog. Use the "smiley face" up to the right of this comment to vote.

👍 "I would like to see this addressed as soon as possible"
👎 "There are other more important things to focus on right now"

We are also happy to receive and review Pull Requests if you want to help working on this issue.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.