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

Provide a way to generate output as part of the ytt processing #213

Open
jorgemoralespou opened this issue Oct 7, 2020 · 6 comments
Open
Labels
discussion This issue is not a bug or feature and a conversation is needed to find an appropriate resolution

Comments

@jorgemoralespou
Copy link

When combining ytt to kapp for installing some templates I want to be able to give the end user some information about what was installed. An example would be credentials or URL access like what happens when installing applications with Helm.
When not combined with kapp, it probably doesn't make sense, as the output I would expect from ytt will most likely be only the processed templates.

There needs to be a way to, when these 2 commands are chained, ytt will give this information to kapp so that kapp can print it out to the user.

@pivotaljohn
Copy link
Contributor

Trying to envision this...

Can you give an example of what this would look like, @jorgemoralespou (e.g. sample output from Helm)?

Are these some kind of post-install notes?

@pivotaljohn pivotaljohn added the discussion This issue is not a bug or feature and a conversation is needed to find an appropriate resolution label Oct 8, 2020
@jorgemoralespou
Copy link
Author

jorgemoralespou commented Oct 8, 2020

Exactly, it would be something just like that. If kapp, succeeds with the installation I would want to be able to get some notes out to the user.

6:27:04PM:     ^ Condition Ready is not True (False)
6:27:06PM: ongoing: reconcile deployment/registry (apps/v1) namespace: tanzu-developer
6:27:06PM:  ^ Waiting for 1 unavailable replicas
6:27:06PM:  L ok: waiting on replicaset/registry-5bbdc78487 (apps/v1) namespace: tanzu-developer
6:27:06PM:  L ok: waiting on pod/registry-5bbdc78487-kcgj9 (v1) namespace: tanzu-developer
6:27:11PM: ok: reconcile deployment/registry (apps/v1) namespace: tanzu-developer
6:27:11PM: ---- applying complete [8/8 done] ----
6:27:11PM: ---- waiting complete [8/8 done] ----

Succeeded

=======================================================================
= docker-registry has been installed.                                 =
=======================================================================

# Your docker-registry has been configured

kubectl logs deployment/registry

export IP="192.168.0.11" # Set to WiFI/ethernet adapter
export PASSWORD="" # See below
kubectl port-forward svc/registry --address 0.0.0.0 5000 &

docker login $IP:5000 --username admin --password $PASSWORD
docker tag alpine:3.11 $IP:5000/alpine:3.11
docker push $IP:5000/alpine:3.11

Registry credentials: admin admin123!
export PASSWORD=admin123!

@pivotaljohn
Copy link
Contributor

Understood. Perhaps a port of Creating a NOTES.txt File from Helm... with a twist...

When not combined with kapp, it probably doesn't make sense, as the output I would expect from ytt will most likely be only the processed templates.

Are we looking to include data from the cluster in the output?

@jorgemoralespou
Copy link
Author

I don't think that aligns with the goals that ytt should not have any random value, and whatever the cluster provide works be considered random I guess. Ashleigh depending on where/how is implemented (if kapp plays a partner to the feature) maybe possible and helpful.

@pivotaljohn
Copy link
Contributor

I don't think that aligns with the goals that ytt should not have any random value, and whatever the cluster provide works be considered random I guess.

Yup. ytt will never directly talk to any outside world source. Any solution, here, I suspect would involve kapp inspect-like output. ytt could consume that output to produce notes...

Ashleigh depending on where/how is implemented (if kapp plays a partner to the feature) maybe possible and helpful.

Sorry, I couldn't parse this sentence.

@jorgemoralespou
Copy link
Author

Although depending on where/how is implemented (if kapp plays a partner to the feature) maybe possible and helpful.

What I mean is that both tools can collaborate. We can have ytt producing output that kapp could use and modify for final result to the user, although this might mean that we would need a way for kapp to parade this output and modify it, and not sure if worth.

I'm any case, I think that all the needed output will probably be available in ytt.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion This issue is not a bug or feature and a conversation is needed to find an appropriate resolution
Projects
Status: To Triage
Development

No branches or pull requests

2 participants