-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
319 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
--- | ||
name: Bug report | ||
about: Create a report to help us improve | ||
title: "[BUG]" | ||
labels: '' | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Describe the bug** | ||
A clear and concise description of what the bug is. | ||
|
||
**To Reproduce** | ||
Steps to reproduce the behavior: | ||
1. Go to '...' | ||
2. Call '....' (make it reproducable by eventually providing the chart the problem occured with) | ||
3. See error | ||
|
||
**Expected behavior** | ||
A clear and concise description of what you expected to happen. | ||
|
||
**khelm version:** | ||
The khelm version you used. | ||
Please copy the first line of the khelm log when templating or the output of `khelm version` (make sure you use the binary the problem occured with) here. | ||
|
||
**Desktop (please complete the following information):** | ||
- OS: [e.g. iOS] | ||
|
||
**Additional context** | ||
Add any other context about the problem here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
name: Feature request | ||
about: Suggest an idea for this project | ||
title: "[FEAT]" | ||
labels: '' | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Is your feature request related to a problem? Please describe.** | ||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] | ||
|
||
**Describe the solution you'd like** | ||
A clear and concise description of what you want to happen. | ||
|
||
**Describe alternatives you've considered** | ||
A clear and concise description of any alternative solutions or features you've considered. | ||
|
||
**Additional context** | ||
Add any other context or screenshots about the feature request here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
name: Question | ||
about: Raise a question | ||
title: "[QUESTION]" | ||
labels: '' | ||
assignees: '' | ||
|
||
--- | ||
|
||
Please provide details and relevant context to your question here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
# Contributor Covenant Code of Conduct | ||
|
||
## Our Pledge | ||
|
||
In the interest of fostering an open and welcoming environment, we as | ||
contributors and maintainers pledge to making participation in our project and | ||
our community a harassment-free experience for everyone, regardless of age, body | ||
size, disability, ethnicity, sex characteristics, gender identity and expression, | ||
level of experience, education, socio-economic status, nationality, personal | ||
appearance, race, religion, or sexual identity and orientation. | ||
|
||
## Our Standards | ||
|
||
Examples of behavior that contributes to creating a positive environment | ||
include: | ||
|
||
* Using welcoming and inclusive language | ||
* Being respectful of differing viewpoints and experiences | ||
* Gracefully accepting constructive criticism | ||
* Focusing on what is best for the community | ||
* Showing empathy towards other community members | ||
|
||
Examples of unacceptable behavior by participants include: | ||
|
||
* The use of sexualized language or imagery and unwelcome sexual attention or | ||
advances | ||
* Trolling, insulting/derogatory comments, and personal or political attacks | ||
* Public or private harassment | ||
* Publishing others' private information, such as a physical or electronic | ||
address, without explicit permission | ||
* Other conduct which could reasonably be considered inappropriate in a | ||
professional setting | ||
|
||
## Our Responsibilities | ||
|
||
Project maintainers are responsible for clarifying the standards of acceptable | ||
behavior and are expected to take appropriate and fair corrective action in | ||
response to any instances of unacceptable behavior. | ||
|
||
Project maintainers have the right and responsibility to remove, edit, or | ||
reject comments, commits, code, wiki edits, issues, and other contributions | ||
that are not aligned to this Code of Conduct, or to ban temporarily or | ||
permanently any contributor for other behaviors that they deem inappropriate, | ||
threatening, offensive, or harmful. | ||
|
||
## Scope | ||
|
||
This Code of Conduct applies both within project spaces and in public spaces | ||
when an individual is representing the project or its community. Examples of | ||
representing a project or community include using an official project e-mail | ||
address, posting via an official social media account, or acting as an appointed | ||
representative at an online or offline event. Representation of a project may be | ||
further defined and clarified by project maintainers. | ||
|
||
## Enforcement | ||
|
||
Instances of abusive, harassing, or otherwise unacceptable behavior may be | ||
reported by contacting the project team at [email protected]. All | ||
complaints will be reviewed and investigated and will result in a response that | ||
is deemed necessary and appropriate to the circumstances. The project team is | ||
obligated to maintain confidentiality with regard to the reporter of an incident. | ||
Further details of specific enforcement policies may be posted separately. | ||
|
||
Project maintainers who do not follow or enforce the Code of Conduct in good | ||
faith may face temporary or permanent repercussions as determined by other | ||
members of the project's leadership. | ||
|
||
## Attribution | ||
|
||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, | ||
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html | ||
|
||
[homepage]: https://www.contributor-covenant.org | ||
|
||
For answers to common questions about this code of conduct, see | ||
https://www.contributor-covenant.org/faq |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# How to contribute | ||
|
||
Contributions, questions and feedback are welcome. | ||
There are just a few small guidelines you need to follow. | ||
|
||
## Community guidelines | ||
|
||
This project follows the [Contributor Covenant Code of Conduct](./CODE_OF_CONDUCT.md). | ||
|
||
## Creating issues | ||
|
||
Feedback, questions, bug reports and feature requests are welcome in form of issues. | ||
Though before creating an issue please have a look [here](https://github.com/mgoltzsche/khelm/issues) if the issue doesn't exist already in order to avoid duplicates. | ||
When you cannot find a corresponding issue please create a [new one](https://github.com/mgoltzsche/khelm/issues/new/choose). | ||
|
||
### Bug reports | ||
|
||
When reporting a bug please answer the following questions: | ||
* Which environment and version do you use? Does it happen with the latest version as well? | ||
* What did you do and what happened? (in a reproducible way ideally) | ||
* What do you expect instead? | ||
|
||
### Feature requests | ||
|
||
When creating a feature request please answer the following questions: | ||
* What is the problem? | ||
* What do you want to change? | ||
* How do you want it to behave? | ||
* Why do you need it? | ||
* Which alternatives did you consider? | ||
|
||
## Creating pull requests (PRs) | ||
|
||
While there is no need to create an issue before creating a PR please consider discussing large changes within an issue first. | ||
|
||
When creating a PR please follow these rules: | ||
* Create one PR per feature. | ||
* Provide one commit per PR. | ||
* Provide a description with each PR and commit that links an issue (if any), describes the problem, how it was solved and how the solution changes the user-facing behaviour. | ||
* All submissions require a review. | ||
* All commits should be signed using PGP and a [DCO](https://en.wikipedia.org/wiki/Developer_Certificate_of_Origin). This can be done using `git commit -s -S`. | ||
* When submitting a bug fix or feature PR please also provide tests. | ||
* When submitting a new feature please document it. | ||
|
||
## Building and testing the source | ||
|
||
See [here](./README.md#build-and-test). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/sh | ||
|
||
cd "$(dirname "$0")/../example" | ||
|
||
echo | ||
echo " TEST $0: Run kpt functions of example/kpt/cache-dependencies" | ||
echo | ||
|
||
set -e | ||
|
||
cd kpt/cache-dependencies | ||
make clean | ||
|
||
( | ||
set -ex | ||
make manifest | ||
[ -f generated-manifests/manifest1.yaml ] | ||
[ -f generated-manifests/manifest1-from-cache.yaml ] | ||
[ -f generated-manifests/manifest2.yaml ] | ||
[ -f generated-manifests/manifest2-from-cache.yaml ] | ||
) | ||
|
||
echo SUCCESS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
apiVersion: kpt.dev/v1alpha1 | ||
kind: Kptfile | ||
metadata: | ||
name: cache-dependencies | ||
packageMetadata: | ||
shortDescription: An caching example |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
all: manifest | ||
|
||
manifest: | ||
mkdir -p $$HOME/.helm | ||
kpt fn run --as-current-user --network \ | ||
--mount "type=bind,src=$$HOME/.helm,dst=/helm,rw=true" \ | ||
--mount "type=bind,src=`pwd`,dst=/source,rw=true" \ | ||
. | ||
|
||
clean: | ||
rm -rf chart/charts chart/requirements.lock generated-manifests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# kpt function example with caching | ||
|
||
This example is used as e2e test and shows that Helm dependencies can be cached. | ||
|
||
Caching can be enabled by mounting a host directory to `/helm` within the container (see `Makefile`). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
apiVersion: v1 | ||
description: example chart | ||
name: example | ||
version: 0.0.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
dependencies: | ||
- name: cert-manager | ||
version: 1.0.2 | ||
repository: https://charts.jetstack.io |
31 changes: 31 additions & 0 deletions
31
example/kpt/cache-dependencies/functions-local-chart-dependencies.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: local-chart-deps-uncached | ||
annotations: | ||
config.kubernetes.io/function: | | ||
container: | ||
image: mgoltzsche/khelm:latest | ||
network: true | ||
config.kubernetes.io/local-config: "true" | ||
data: | ||
chart: ./source/chart | ||
name: cert-manager | ||
namespace: cert-manager | ||
outputPath: generated-manifests/manifest2.yaml | ||
--- | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: local-chart-deps-cached | ||
annotations: | ||
config.kubernetes.io/function: | | ||
container: | ||
image: mgoltzsche/khelm:latest | ||
network: false | ||
config.kubernetes.io/local-config: "true" | ||
data: | ||
chart: ./source/chart | ||
name: cert-manager | ||
namespace: cert-manager | ||
outputPath: generated-manifests/manifest2-from-cache.yaml |
35 changes: 35 additions & 0 deletions
35
example/kpt/cache-dependencies/functions-remote-chart.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: remote-chart-uncached | ||
annotations: | ||
config.kubernetes.io/function: | | ||
container: | ||
image: mgoltzsche/khelm:latest | ||
network: true | ||
config.kubernetes.io/local-config: "true" | ||
data: | ||
repository: https://charts.jetstack.io | ||
chart: cert-manager | ||
version: 1.1.0 | ||
name: cert-manager | ||
namespace: cert-manager | ||
outputPath: generated-manifests/manifest1.yaml | ||
--- | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: remote-chart-cached | ||
annotations: | ||
config.kubernetes.io/function: | | ||
container: | ||
image: mgoltzsche/khelm:latest | ||
network: false | ||
config.kubernetes.io/local-config: "true" | ||
data: | ||
repository: https://charts.jetstack.io | ||
chart: cert-manager | ||
version: 1.1.0 | ||
name: cert-manager | ||
namespace: cert-manager | ||
outputPath: generated-manifests/manifest1-from-cache.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters