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

Added K8s example for header routing #193

Closed
wants to merge 3 commits into from

Conversation

kiranmeduri
Copy link
Contributor

Issue #, if available:

Description of changes:
Related to aws/aws-app-mesh-controller-for-k8s#56

Keeping in draft until controller change is released.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Copy link

@jaypipes jaypipes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice stuff, @kiranmeduri :)

exit 1
fi

if [ -z "${MESH_NAME}" ]; then

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be EKS_CLUSTER not MESH_NAME?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MESH_NAME is more appropriate given that this example should work outside of EKS, i.e. any K8s cluster

for f in mesh app; do
eval "cat <<EOF
$(<${DIR}/${f}.yaml.template)
EOF" >${OUT_DIR}/${f}.yaml

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You might use the envsubst program instead of the above use of eval:

for f in mesh app; do
    envsubst <$DIR/$f.yaml.template >$DIR/$f.yaml
done

https://www.gnu.org/software/gettext/manual/html_node/envsubst-Invocation.html

You'd want to export the vars used in the template, though.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't I need to install gettext for this to work?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pretty sure envsubst is a standard utility on Linux at this point, but not a huge deal :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not on my mac :(. Will leave it for now. Thanks for pointer.

@kiranmeduri kiranmeduri force-pushed the header-priority branch 2 times, most recently from 7f91829 to 9afb817 Compare August 19, 2019 17:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants