Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
christianhuth committed Dec 17, 2024
1 parent 613ed69 commit 0d94c2d
Show file tree
Hide file tree
Showing 32 changed files with 1,651 additions and 1,625 deletions.
35 changes: 21 additions & 14 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,17 @@

"image": "mcr.microsoft.com/devcontainers/base:ubuntu-22.04",

"containerEnv": {
"HOME": "/home/vscode",
"containerEnv": {
"HOME": "/home/vscode",
"SHELL": "/bin/bash"
},
},

// Features to add to the dev container. More info: https://containers.dev/features.
"features": {
"ghcr.io/devcontainers/features/docker-in-docker:2": {
"enableNonRootDocker": "true",
"moby": "true"
},
"ghcr.io/devcontainers/features/kubectl-helm-minikube:1": {
"version": "latest",
"helm": "latest",
Expand All @@ -22,22 +26,25 @@
"ghcr.io/mpriscella/features/helm-chart-testing:1": {}
},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "/bin/bash .devcontainer/postCreateCommand.sh",

"remoteUser": "vscode",
"remoteUser": "vscode",

// Configure tool-specific properties.
"customizations": {
"vscode": {
"extensions": [
"ms-kubernetes-tools.vscode-kubernetes-tools",
// Configure tool-specific properties.
"customizations": {
"vscode": {
"extensions": [
"ms-kubernetes-tools.vscode-kubernetes-tools",
"tim-koehler.helm-intellisense"
]
}
}
]
}
},

"workspaceFolder": "/home/vscode/helm-charts",
"workspaceMount": "source=${localWorkspaceFolder},target=/home/vscode/helm-charts,type=bind"

}
18 changes: 17 additions & 1 deletion .devcontainer/postCreateCommand.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,25 @@ pre-commit install --install-hooks
TEMP_COMPLETION_FOLDER="${HOME}/bash_completion.d"
COMPLETION_FOLDER="/etc/bash_completion.d"
mkdir -p ${TEMP_COMPLETION_FOLDER}
BINARIES=("ct")
BINARIES=("ct" "minikube")
for binary in "${BINARIES[@]}"
do
$binary completion bash > ${TEMP_COMPLETION_FOLDER}/$binary
sudo mv ${TEMP_COMPLETION_FOLDER}/$binary ${COMPLETION_FOLDER}/$binary
done

# install helm plugins

## helm-unittest
helm plugin install https://github.com/helm-unittest/helm-unittest.git

## helm-schema-gen
helm plugin install https://github.com/KnechtionsCoding/helm-schema-gen.git

# start minikube
minikube start --addons=ingress --cpus=4 --memory=8g --profile=helm-charts-development
minikube profile helm-charts-development

# configure git
git config --global user.email "[email protected]"
git config --global user.name "christianhuth"
8 changes: 7 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
Expand All @@ -13,10 +13,16 @@ repos:
- id: check-yaml
args: [--allow-multiple-documents]
exclude: ^charts/.*/templates/

- repo: https://github.com/norwoodj/helm-docs
rev: ""
hooks:
- id: helm-docs-container
entry: jnorwood/helm-docs:v1.14.2
args:
- --chart-search-root=charts

- repo: https://github.com/gruntwork-io/pre-commit
rev: v0.1.25
hooks:
- id: helmlint
76 changes: 38 additions & 38 deletions charts/argocd-metrics-server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,44 +46,44 @@ The command removes all the Kubernetes components associated with the chart and

## Values

| Key | Type | Default | Description |
| -------------------------------------- | ------ | ----------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
| affinity | object | `{}` | Affinity settings for pod assignment |
| extraEnv | list | `[]` | additional environment variables to be added to the pods |
| fullnameOverride | string | `""` | String to fully override `"argocd-extension-metrics.fullname"` |
| image.pullPolicy | string | `"Always"` | image pull policy |
| image.registry | string | `"quay.io"` | image registory |
| image.repository | string | `"argoprojlabs/argocd-extension-metrics"` | image repository |
| image.tag | string | `"v1.0.3"` | Overrides the image tag |
| imagePullSecrets | list | `[]` | If defined, uses a Secret to pull an image from a private Docker registry or repository. |
| nameOverride | string | `""` | Provide a name in place of `argocd-extension-metrics` |
| networkPolicy.additionalAnnotations | object | `{}` | Annotations to be added to the NetworkPolicies |
| networkPolicy.additionalLabels | object | `{}` | Labels to be added to the NetworkPolicies |
| networkPolicy.argocd.enabled | bool | `true` | - allow incoming traffic from Argo CD |
| networkPolicy.argocd.namespaceSelector | object | `{}` | The labels of the namespace where Argo CD is running |
| networkPolicy.argocd.podSelector | object | `{}` | The labels of the Argo CD Pods |
| networkPolicy.dns.enabled | bool | `true` | allow outgoing traffic to the Kubernetes DNS |
| networkPolicy.dns.namespaceSelector | object | `{"kubernetes.io/metadata.name":"kube-system"}` | The labels of the namespace where the Kubernetes DNS is running |
| networkPolicy.dns.podSelector | object | `{"k8s-app":"kube-dns"}` | The labels of the Kubernetes DNS Pods |
| networkPolicy.enabled | bool | `false` | - create a NetworkPolicy resource to limit the allowed traffic |
| networkPolicy.prometheus.enabled | bool | `true` | - allow outgoing traffic to Prometheus |
| networkPolicy.prometheus.podSelector | object | `{"app.kubernetes.io/name":"prometheus"}` | The labels of the Prometheus Pods |
| nodeSelector | object | `{}` | Node labels for pod assignment |
| podSecurityContext | object | `{}` | pod-level security context |
| prometheus.dashboards | string | see [values.yaml](./values.yaml) | The dashboards that will be displayed in the Argo CD UI |
| prometheus.namespace | string | `"monitoring"` | The namespace where Prometheus is running |
| prometheus.port | int | `9090` | The port on which the Prometheus service is listening for traffic |
| prometheus.service | string | `"prometheus-operated"` | The name of the Prometheus service |
| replicaCount | int | `1` | Number of replicas |
| resources | object | `{"requests":{"cpu":"100m","memory":"100Mi"}}` | Resource limits and requests for the controller pods. |
| revisionHistoryLimit | int | `0` | The number of old ReplicaSets to retain |
| securityContext | object | `{}` | container-level security context |
| service.port | int | `9003` | Kubernetes port where service is exposed |
| service.type | string | `"ClusterIP"` | Kubernetes service type |
| serviceAccount.annotations | object | `{}` | Annotations to add to the service account |
| serviceAccount.create | bool | `true` | Specifies whether a service account should be created |
| serviceAccount.name | string | `""` | The name of the service account to use. If not set and create is true, a name is generated using the fullname template |
| tolerations | list | `[]` | Toleration labels for pod assignment |
| Key | Type | Default | Description |
|-----|------|---------|-------------|
| affinity | object | `{}` | Affinity settings for pod assignment |
| extraEnv | list | `[]` | additional environment variables to be added to the pods |
| fullnameOverride | string | `""` | String to fully override `"argocd-extension-metrics.fullname"` |
| image.pullPolicy | string | `"Always"` | image pull policy |
| image.registry | string | `"quay.io"` | image registory |
| image.repository | string | `"argoprojlabs/argocd-extension-metrics"` | image repository |
| image.tag | string | `"v1.0.3"` | Overrides the image tag |
| imagePullSecrets | list | `[]` | If defined, uses a Secret to pull an image from a private Docker registry or repository. |
| nameOverride | string | `""` | Provide a name in place of `argocd-extension-metrics` |
| networkPolicy.additionalAnnotations | object | `{}` | Annotations to be added to the NetworkPolicies |
| networkPolicy.additionalLabels | object | `{}` | Labels to be added to the NetworkPolicies |
| networkPolicy.argocd.enabled | bool | `true` | - allow incoming traffic from Argo CD |
| networkPolicy.argocd.namespaceSelector | object | `{}` | The labels of the namespace where Argo CD is running |
| networkPolicy.argocd.podSelector | object | `{}` | The labels of the Argo CD Pods |
| networkPolicy.dns.enabled | bool | `true` | allow outgoing traffic to the Kubernetes DNS |
| networkPolicy.dns.namespaceSelector | object | `{"kubernetes.io/metadata.name":"kube-system"}` | The labels of the namespace where the Kubernetes DNS is running |
| networkPolicy.dns.podSelector | object | `{"k8s-app":"kube-dns"}` | The labels of the Kubernetes DNS Pods |
| networkPolicy.enabled | bool | `false` | - create a NetworkPolicy resource to limit the allowed traffic |
| networkPolicy.prometheus.enabled | bool | `true` | - allow outgoing traffic to Prometheus |
| networkPolicy.prometheus.podSelector | object | `{"app.kubernetes.io/name":"prometheus"}` | The labels of the Prometheus Pods |
| nodeSelector | object | `{}` | Node labels for pod assignment |
| podSecurityContext | object | `{}` | pod-level security context |
| prometheus.dashboards | string | see [values.yaml](./values.yaml) | The dashboards that will be displayed in the Argo CD UI |
| prometheus.namespace | string | `"monitoring"` | The namespace where Prometheus is running |
| prometheus.port | int | `9090` | The port on which the Prometheus service is listening for traffic |
| prometheus.service | string | `"prometheus-operated"` | The name of the Prometheus service |
| replicaCount | int | `1` | Number of replicas |
| resources | object | `{"requests":{"cpu":"100m","memory":"100Mi"}}` | Resource limits and requests for the controller pods. |
| revisionHistoryLimit | int | `0` | The number of old ReplicaSets to retain |
| securityContext | object | `{}` | container-level security context |
| service.port | int | `9003` | Kubernetes port where service is exposed |
| service.type | string | `"ClusterIP"` | Kubernetes service type |
| serviceAccount.annotations | object | `{}` | Annotations to add to the service account |
| serviceAccount.create | bool | `true` | Specifies whether a service account should be created |
| serviceAccount.name | string | `""` | The name of the service account to use. If not set and create is true, a name is generated using the fullname template |
| tolerations | list | `[]` | Toleration labels for pod assignment |

Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`.

Expand Down
Loading

0 comments on commit 0d94c2d

Please sign in to comment.