Skip to content

Commit 9178af8

Browse files
Merge pull request #1 from treebeardtech/dev-0.1
Dev 0.1
2 parents 9ea697a + a97424c commit 9178af8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+1686
-2792
lines changed

.devcontainer/Dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,7 @@ ENV DEBIAN_FRONTEND=noninteractive
1414
RUN sudo apt-get update -y && sudo apt-get install -y \
1515
iputils-ping \
1616
traceroute \
17-
kmod
18-
ENV PATH="/home/vscode/.local/bin/:$PATH"
17+
kmod \
18+
vim
19+
ENV PATH="/home/vscode/.local/bin/:$PATH"
20+
ENV EDITOR=vim

.devcontainer/devcontainer.json

Lines changed: 15 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -26,40 +26,16 @@
2626
"NODE_VERSION": "18.7"
2727
}
2828
},
29-
"runArgs": [ // maybe remove this
30-
"--network=host",
31-
],
3229
"features": {
33-
"ghcr.io/devcontainers-contrib/features/cloudflared:1": {},
34-
"ghcr.io/devcontainers/features/go:1": {
35-
},
36-
"ghcr.io/devcontainers/features/aws-cli": {
37-
"version": "2.6.3"
38-
},
39-
"ghcr.io/devcontainers-contrib/features/zsh-plugins:0": {
40-
"omzPlugins": "zsh-syntax-highlighting zsh-autosuggestions"
41-
},
42-
"ghcr.io/devcontainers-contrib/features/starship-homebrew:1": {},
43-
"ghcr.io/devcontainers-contrib/features/aws-cdk:2": {
44-
"version": "2.59.0"
45-
},
46-
"ghcr.io/devcontainers/features/azure-cli:1": {},
4730
"ghcr.io/devcontainers/features/terraform:1": {
4831
"version": "1.6.2"
4932
},
5033
"ghcr.io/devcontainers/features/docker-outside-of-docker:1": {},
5134
"ghcr.io/devcontainers-contrib/features/kind:1": {},
52-
"ghcr.io/devcontainers-contrib/features/packer-asdf:2": {},
5335
"ghcr.io/devcontainers/features/kubectl-helm-minikube:1": {
5436
"version": "1.25.6"
5537
},
5638
"ghcr.io/rio/features/k3d:1": {},
57-
// "ghcr.io/devcontainers/features/nix:1": {},
58-
"ghcr.io/devcontainers-contrib/features/infracost:1": {
59-
"version": "0.10.30"
60-
},
61-
"ghcr.io/dhoeric/features/google-cloud-cli:1": {
62-
},
6339
"ghcr.io/devcontainers-contrib/features/terraform-docs:1": {
6440
},
6541
"ghcr.io/devcontainers/features/github-cli:1": {
@@ -68,21 +44,23 @@
6844
},
6945
"ghcr.io/devcontainers-contrib/features/istioctl:1": {
7046
},
47+
"ghcr.io/devcontainers-contrib/features/argo-cd:1": {
48+
},
7149
},
7250
"mounts": [
73-
"source=${localEnv:HOME}${localEnv:USERPROFILE}/.aws,target=/home/vscode/.aws,type=bind,consistency=cached",
74-
"source=${localEnv:HOME}${localEnv:USERPROFILE}/.aws,target=/home/vscode/.aws,type=bind,consistency=cached",
75-
"source=${localEnv:HOME}${localEnv:USERPROFILE}/.ssh,target=/home/vscode/.ssh,type=bind,consistency=cached",
51+
// "source=${localEnv:HOME}${localEnv:USERPROFILE}/.aws,target=/home/vscode/.aws,type=bind,consistency=cached",
52+
// "source=${localEnv:HOME}${localEnv:USERPROFILE}/.aws,target=/home/vscode/.aws,type=bind,consistency=cached",
53+
// "source=${localEnv:HOME}${localEnv:USERPROFILE}/.ssh,target=/home/vscode/.ssh,type=bind,consistency=cached",
7654
// "source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind,consistency=cached",
77-
"source=${localEnv:HOME}${localEnv:USERPROFILE}/.zsh_history,target=/home/vscode/.zsh_history,type=bind,consistency=cached",
78-
"source=${localEnv:HOME}${localEnv:USERPROFILE}/.zshrc,target=/home/vscode/.zshrc,type=bind,consistency=cached",
79-
"source=${localEnv:HOME}${localEnv:USERPROFILE}/.zshenv,target=/home/vscode/.zshenv,type=bind,consistency=cached",
80-
"source=${localEnv:HOME}${localEnv:USERPROFILE}/.terraform.d,target=/home/vscode/.terraform.d,type=bind,consistency=cached",
81-
"source=${localEnv:HOME}${localEnv:USERPROFILE}/.azure,target=/home/vscode/.azure,type=bind,consistency=cached",
82-
"source=${localEnv:HOME}${localEnv:USERPROFILE}/.config/infracost,target=/home/vscode/.config/infracost,type=bind,consistency=cached",
83-
"source=${localEnv:HOME}${localEnv:USERPROFILE}/.config/gcloud,target=/home/vscode/.config/gcloud,type=bind,consistency=cached",
84-
"source=${localEnv:HOME}${localEnv:USERPROFILE}/.config/starship.toml,target=/home/vscode/.config/starship.toml,type=bind,consistency=cached",
85-
"source=${localEnv:HOME}${localEnv:USERPROFILE}/.kube,target=/home/vscode/.kube,type=bind,consistency=cached",
86-
"source=${localEnv:HOME}${localEnv:USERPROFILE}/.gitconfig,target=/home/vscode/.gitconfig,type=bind,consistency=cached",
55+
// "source=${localEnv:HOME}${localEnv:USERPROFILE}/.zsh_history,target=/home/vscode/.zsh_history,type=bind,consistency=cached",
56+
// "source=${localEnv:HOME}${localEnv:USERPROFILE}/.zshrc,target=/home/vscode/.zshrc,type=bind,consistency=cached",
57+
// "source=${localEnv:HOME}${localEnv:USERPROFILE}/.zshenv,target=/home/vscode/.zshenv,type=bind,consistency=cached",
58+
// "source=${localEnv:HOME}${localEnv:USERPROFILE}/.terraform.d,target=/home/vscode/.terraform.d,type=bind,consistency=cached",
59+
// "source=${localEnv:HOME}${localEnv:USERPROFILE}/.azure,target=/home/vscode/.azure,type=bind,consistency=cached",
60+
// "source=${localEnv:HOME}${localEnv:USERPROFILE}/.config/infracost,target=/home/vscode/.config/infracost,type=bind,consistency=cached",
61+
// "source=${localEnv:HOME}${localEnv:USERPROFILE}/.config/gcloud,target=/home/vscode/.config/gcloud,type=bind,consistency=cached",
62+
// "source=${localEnv:HOME}${localEnv:USERPROFILE}/.config/starship.toml,target=/home/vscode/.config/starship.toml,type=bind,consistency=cached",
63+
// "source=${localEnv:HOME}${localEnv:USERPROFILE}/.kube,target=/home/vscode/.kube,type=bind,consistency=cached",
64+
// "source=${localEnv:HOME}${localEnv:USERPROFILE}/.gitconfig,target=/home/vscode/.gitconfig,type=bind,consistency=cached",
8765
]
8866
}

.devcontainer/vm/Dockerfile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.148.1/containers/python-3/.devcontainer/base.Dockerfile
2+
ARG VARIANT="3.11"
3+
FROM mcr.microsoft.com/vscode/devcontainers/python:0-${VARIANT} as devcontainer
4+
ARG INSTALL_NODE="true"
5+
ARG NODE_VERSION="lts/*"
6+
RUN if [ "${INSTALL_NODE}" = "true" ]; then su vscode -c "source /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi
7+
USER vscode
8+
RUN pip3 --disable-pip-version-check --no-cache-dir install -U \
9+
'poetry==1.6.1' \
10+
'pre-commit==3.6.0' \
11+
'pip==23.2.1'
12+
RUN npm install -g @devcontainers/[email protected]
13+
ENV DEBIAN_FRONTEND=noninteractive
14+
RUN sudo apt-get update -y && sudo apt-get install -y \
15+
iputils-ping \
16+
traceroute \
17+
kmod \
18+
vim
19+
ENV PATH="/home/vscode/.local/bin/:$PATH"
20+
ENV EDITOR=vim

.devcontainer/vm/devcontainer.json

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
{
2+
"postCreateCommand": "make post-create",
3+
"postStartCommand": "make post-start",
4+
"remoteUser": "vscode",
5+
"customizations": {
6+
"vscode": {
7+
"settings": {
8+
"terminal.integrated.defaultProfile.linux": "zsh",
9+
"python.pythonPath": "/usr/local/bin/python"
10+
},
11+
"extensions": [
12+
"ms-python.python",
13+
"mutantdino.resourcemonitor",
14+
"github.copilot",
15+
"github.copilot-chat"
16+
]
17+
}
18+
},
19+
"build": {
20+
"dockerfile": "Dockerfile",
21+
"target": "devcontainer",
22+
"context": "..",
23+
"args": {
24+
"VARIANT": "3.11",
25+
"INSTALL_NODE": "true",
26+
"NODE_VERSION": "18.7"
27+
}
28+
},
29+
"runArgs": [ // maybe remove this
30+
"--network=host",
31+
],
32+
"features": {
33+
"ghcr.io/devcontainers-contrib/features/cloudflared:1": {},
34+
"ghcr.io/devcontainers/features/go:1": {
35+
},
36+
"ghcr.io/devcontainers/features/aws-cli": {
37+
"version": "2.6.3"
38+
},
39+
"ghcr.io/devcontainers-contrib/features/zsh-plugins:0": {
40+
"omzPlugins": "zsh-syntax-highlighting zsh-autosuggestions"
41+
},
42+
"ghcr.io/devcontainers-contrib/features/starship-homebrew:1": {},
43+
"ghcr.io/devcontainers-contrib/features/aws-cdk:2": {
44+
"version": "2.59.0"
45+
},
46+
"ghcr.io/devcontainers/features/azure-cli:1": {},
47+
"ghcr.io/devcontainers/features/terraform:1": {
48+
"version": "1.6.2"
49+
},
50+
"ghcr.io/devcontainers/features/docker-outside-of-docker:1": {},
51+
"ghcr.io/devcontainers-contrib/features/kind:1": {},
52+
"ghcr.io/devcontainers-contrib/features/packer-asdf:2": {},
53+
"ghcr.io/devcontainers/features/kubectl-helm-minikube:1": {
54+
"version": "1.25.6"
55+
},
56+
"ghcr.io/rio/features/k3d:1": {},
57+
// "ghcr.io/devcontainers/features/nix:1": {},
58+
"ghcr.io/devcontainers-contrib/features/infracost:1": {
59+
"version": "0.10.30"
60+
},
61+
"ghcr.io/dhoeric/features/google-cloud-cli:1": {
62+
},
63+
"ghcr.io/devcontainers-contrib/features/terraform-docs:1": {
64+
},
65+
"ghcr.io/devcontainers/features/github-cli:1": {
66+
},
67+
"ghcr.io/rio/features/k9s:1": {
68+
},
69+
"ghcr.io/devcontainers-contrib/features/istioctl:1": {
70+
},
71+
"ghcr.io/devcontainers-contrib/features/argo-cd:1": {
72+
},
73+
},
74+
"mounts": [
75+
"source=${localEnv:HOME}${localEnv:USERPROFILE}/.aws,target=/home/vscode/.aws,type=bind,consistency=cached",
76+
"source=${localEnv:HOME}${localEnv:USERPROFILE}/.aws,target=/home/vscode/.aws,type=bind,consistency=cached",
77+
"source=${localEnv:HOME}${localEnv:USERPROFILE}/.ssh,target=/home/vscode/.ssh,type=bind,consistency=cached",
78+
// "source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind,consistency=cached",
79+
"source=${localEnv:HOME}${localEnv:USERPROFILE}/.zsh_history,target=/home/vscode/.zsh_history,type=bind,consistency=cached",
80+
"source=${localEnv:HOME}${localEnv:USERPROFILE}/.zshrc,target=/home/vscode/.zshrc,type=bind,consistency=cached",
81+
"source=${localEnv:HOME}${localEnv:USERPROFILE}/.zshenv,target=/home/vscode/.zshenv,type=bind,consistency=cached",
82+
"source=${localEnv:HOME}${localEnv:USERPROFILE}/.terraform.d,target=/home/vscode/.terraform.d,type=bind,consistency=cached",
83+
"source=${localEnv:HOME}${localEnv:USERPROFILE}/.azure,target=/home/vscode/.azure,type=bind,consistency=cached",
84+
"source=${localEnv:HOME}${localEnv:USERPROFILE}/.config/infracost,target=/home/vscode/.config/infracost,type=bind,consistency=cached",
85+
"source=${localEnv:HOME}${localEnv:USERPROFILE}/.config/gcloud,target=/home/vscode/.config/gcloud,type=bind,consistency=cached",
86+
"source=${localEnv:HOME}${localEnv:USERPROFILE}/.config/starship.toml,target=/home/vscode/.config/starship.toml,type=bind,consistency=cached",
87+
"source=${localEnv:HOME}${localEnv:USERPROFILE}/.kube,target=/home/vscode/.kube,type=bind,consistency=cached",
88+
"source=${localEnv:HOME}${localEnv:USERPROFILE}/.gitconfig,target=/home/vscode/.gitconfig,type=bind,consistency=cached",
89+
]
90+
}

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ crash.*.log
1313
# password, private keys, and other secrets. These should not be part of version
1414
# control as they are data points which are potentially sensitive and subject
1515
# to change depending on the environment.
16-
*.tfvars
17-
*.tfvars.json
16+
# *.tfvars
17+
# *.tfvars.json
1818

1919
# Ignore override files as they are usually used to override resources locally and so
2020
# are not checked in

.gitmodules

Lines changed: 0 additions & 3 deletions
This file was deleted.

.terraform.lock.hcl

Lines changed: 0 additions & 62 deletions
This file was deleted.

CODE_OF_CONDUCT.md

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as
6+
contributors and maintainers pledge to making participation in our project and
7+
our community a harassment-free experience for everyone, regardless of age, body
8+
size, disability, ethnicity, sex characteristics, gender identity and expression,
9+
level of experience, education, socio-economic status, nationality, personal
10+
appearance, race, religion, or sexual identity and orientation.
11+
12+
## Our Standards
13+
14+
Examples of behavior that contributes to creating a positive environment
15+
include:
16+
17+
* Using welcoming and inclusive language
18+
* Being respectful of differing viewpoints and experiences
19+
* Gracefully accepting constructive criticism
20+
* Focusing on what is best for the community
21+
* Showing empathy towards other community members
22+
23+
Examples of unacceptable behavior by participants include:
24+
25+
* The use of sexualized language or imagery and unwelcome sexual attention or
26+
advances
27+
* Trolling, insulting/derogatory comments, and personal or political attacks
28+
* Public or private harassment
29+
* Publishing others' private information, such as a physical or electronic
30+
address, without explicit permission
31+
* Other conduct which could reasonably be considered inappropriate in a
32+
professional setting
33+
34+
## Our Responsibilities
35+
36+
Project maintainers are responsible for clarifying the standards of acceptable
37+
behavior and are expected to take appropriate and fair corrective action in
38+
response to any instances of unacceptable behavior.
39+
40+
Project maintainers have the right and responsibility to remove, edit, or
41+
reject comments, commits, code, wiki edits, issues, and other contributions
42+
that are not aligned to this Code of Conduct, or to ban temporarily or
43+
permanently any contributor for other behaviors that they deem inappropriate,
44+
threatening, offensive, or harmful.
45+
46+
## Scope
47+
48+
This Code of Conduct applies both within project spaces and in public spaces
49+
when an individual is representing the project or its community. Examples of
50+
representing a project or community include using an official project e-mail
51+
address, posting via an official social media account, or acting as an appointed
52+
representative at an online or offline event. Representation of a project may be
53+
further defined and clarified by project maintainers.
54+
55+
## Enforcement
56+
57+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58+
reported by contacting the project team at [email protected]. All
59+
complaints will be reviewed and investigated and will result in a response that
60+
is deemed necessary and appropriate to the circumstances. The project team is
61+
obligated to maintain confidentiality with regard to the reporter of an incident.
62+
Further details of specific enforcement policies may be posted separately.
63+
64+
Project maintainers who do not follow or enforce the Code of Conduct in good
65+
faith may face temporary or permanent repercussions as determined by other
66+
members of the project's leadership.
67+
68+
## Attribution
69+
70+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71+
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
72+
73+
[homepage]: https://www.contributor-covenant.org
74+
75+
For answers to common questions about this code of conduct, see
76+
https://www.contributor-covenant.org/faq

CONTRIBUTING.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Contributing
2+
3+
Thanks for considering contributing to Kubeflow Terraform Modules. We are open to contributions but please check via GitHub issues that we don't already provide the functionality you are requesting and that we are open to it being contributed.
4+
5+
## Creating a development environment
6+
7+
We recommend an Ubuntu environment running docker with 2 cpus and 16G of memory.
8+
9+
This can be achieved using VSCode and the `.devcontainer` directory in this repo. A cloud VM gives the best performance.
10+
11+
* [devcontainer docs](https://containers.dev/)
12+
* See the `.devcontainer` directory for details on dev dependencies, the main ones are:
13+
* k3d
14+
* helm CLI
15+
* terraform CLI
16+
17+
## Install from source
18+
19+
While developing your change, install the K3s example into a local K3d cluster. Follow [the example](./examples/k3s/README.md) to do this.
20+
21+
## Make a change
22+
23+
You can change terraform files in the project then `terraform apply` to see them in your dev environment.
24+
25+
## Ensure changes work in non K3s environments
26+
27+
This can be validated by following examples other K8s providers such as EKS.

0 commit comments

Comments
 (0)