-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from KumKeeHyun/helm
Helm
- Loading branch information
Showing
24 changed files
with
325 additions
and
6 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,83 @@ | ||
# Infra Settings | ||
|
||
## MetalLB | ||
|
||
### Install with Helm | ||
|
||
```shell | ||
$ helm repo add metallb https://metallb.github.io/metallb | ||
"metallb" has been added to your repositories | ||
|
||
$ helm repo update | ||
Hang tight while we grab the latest from your chart repositories... | ||
...Successfully got an update from the "metallb" chart repository | ||
Update Complete. ⎈Happy Helming!⎈ | ||
|
||
$ helm repo list | ||
NAME URL | ||
metallb https://metallb.github.io/metallb | ||
|
||
$ helm install metallb metallb/metallb --create-namespace -n metallb-system | ||
NAME: metallb | ||
LAST DEPLOYED: Thu Aug 17 17:23:25 2023 | ||
NAMESPACE: metallb-system | ||
STATUS: deployed | ||
REVISION: 1 | ||
TEST SUITE: None | ||
NOTES: | ||
MetalLB is now running in the cluster. | ||
|
||
Now you can configure it via its CRs. Please refer to the metallb official docs | ||
on how to use the CRs. | ||
|
||
$ kubectl apply -f metallb-configs.yaml | ||
ipaddresspool.metallb.io/address-pool created | ||
l2advertisement.metallb.io/layer2 created | ||
``` | ||
## ArgoCD | ||
### Install with Manifest | ||
```shell | ||
$ kubectl create namespace argocd | ||
$ kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml | ||
customresourcedefinition.apiextensions.k8s.io/applications.argoproj.io created | ||
customresourcedefinition.apiextensions.k8s.io/applicationsets.argoproj.io created | ||
customresourcedefinition.apiextensions.k8s.io/appprojects.argoproj.io created | ||
serviceaccount/argocd-application-controller created | ||
serviceaccount/argocd-applicationset-controller created | ||
serviceaccount/argocd-dex-server created | ||
serviceaccount/argocd-notifications-controller created | ||
serviceaccount/argocd-redis created | ||
... | ||
|
||
# option | ||
$ kubectl patch svc argocd-server -n argocd -p '{"spec": {"type": "LoadBalancer"}}' | ||
|
||
# get admin password | ||
$ kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d; echo | ||
|
||
# delete all resources | ||
$ kubectl delete -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml | ||
``` | ||
## Traefik | ||
### Install with Helm | ||
```shell | ||
$ helm repo add traefik https://traefik.github.io/charts | ||
"traefik" has been added to your repositories | ||
|
||
$ helm repo update | ||
Hang tight while we grab the latest from your chart repositories... | ||
...Successfully got an update from the "traefik" chart repository | ||
Update Complete. ⎈Happy Helming!⎈ | ||
|
||
$ helm repo list | ||
NAME URL | ||
traefik https://traefik.github.io/chart | ||
|
||
$ helm install traefik traefik/traefik --create-namespace -n traefik | ||
``` |
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,17 @@ | ||
apiVersion: metallb.io/v1beta1 | ||
kind: IPAddressPool | ||
metadata: | ||
name: address-pool | ||
namespace: metallb-system | ||
spec: | ||
addresses: | ||
- 127.0.0.240/28 | ||
--- | ||
apiVersion: metallb.io/v1beta1 | ||
kind: L2Advertisement | ||
metadata: | ||
name: layer2 | ||
namespace: metallb-system | ||
spec: | ||
ipAddressPools: | ||
- address-pool |
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 @@ | ||
dependencies: | ||
- name: traefik | ||
repository: https://helm.traefik.io/traefik | ||
version: 24.0.0 | ||
digest: sha256:9dcd24238364a78ff6303c4ccaf2c6f13ea1d8cc5f7ba3fada4c82a796153a5b | ||
generated: "2023-08-18T00:16:25.936848+09:00" |
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 @@ | ||
apiVersion: v2 | ||
name: traefik-ingress-charts | ||
version: 0.0.1 | ||
sources: | ||
- https://github.com/KumKeeHyun/go-gin-realworld-example-app | ||
dependencies: | ||
- name: traefik | ||
repository: https://helm.traefik.io/traefik | ||
version: 24.0.0 | ||
condition: traefik.enabled |
Binary file not shown.
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,22 @@ | ||
apiVersion: traefik.containo.us/v1alpha1 | ||
kind: IngressRoute | ||
metadata: | ||
name: argocd | ||
namespace: argocd | ||
spec: | ||
entryPoints: | ||
- websecure | ||
routes: | ||
- match: Host(`argocd.{{ .Values.adminConfig.DOMAIN_NAME }}`) | ||
kind: Rule | ||
priority: 10 | ||
services: | ||
- name: argocd-server | ||
port: 443 | ||
- match: Host(`argocd.{{ .Values.adminConfig.DOMAIN_NAME }}`) && Headers(`Content-Type`, `application/grpc`) | ||
kind: Rule | ||
priority: 11 | ||
services: | ||
- name: argocd-server | ||
port: 443 | ||
scheme: h2c |
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,14 @@ | ||
apiVersion: traefik.containo.us/v1alpha1 | ||
kind: IngressRoute | ||
metadata: | ||
name: grafana | ||
namespace: observability | ||
spec: | ||
entryPoints: | ||
- websecure | ||
routes: | ||
- match: Host(`grafana.{{ .Values.adminConfig.DOMAIN_NAME }}`) | ||
kind: Rule | ||
services: | ||
- name: observability-grafana | ||
port: 80 |
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,14 @@ | ||
apiVersion: traefik.containo.us/v1alpha1 | ||
kind: IngressRoute | ||
metadata: | ||
name: prometheus | ||
namespace: observability | ||
spec: | ||
entryPoints: | ||
- websecure | ||
routes: | ||
- match: Host(`prometheus.{{ .Values.adminConfig.DOMAIN_NAME }}`) | ||
kind: Rule | ||
services: | ||
- name: prometheus-operated | ||
port: 9090 |
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 @@ | ||
traefik: | ||
enabled: true | ||
adminConfig: | ||
DOMAIN_NAME: localhost |
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 @@ | ||
dependencies: | ||
- name: kube-prometheus-stack | ||
repository: https://prometheus-community.github.io/helm-charts | ||
version: 48.3.1 | ||
digest: sha256:c5571cb1b6dded53f89e757d1d7039c6a98ea4d9b7d9d0c6604a1af4e42c45a4 | ||
generated: "2023-08-18T00:15:03.926057+09:00" |
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 @@ | ||
apiVersion: v2 | ||
name: observability-charts | ||
version: 0.0.1 | ||
sources: | ||
- https://github.com/KumKeeHyun/go-gin-realworld-example-app | ||
dependencies: | ||
- name: kube-prometheus-stack | ||
repository: https://prometheus-community.github.io/helm-charts | ||
version: 48.3.1 | ||
condition: kube-prometheus-stack.enabled |
Binary file not shown.
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,43 @@ | ||
kube-prometheus-stack: | ||
enabled: true | ||
defaultRules: | ||
create: false | ||
alertmanager: | ||
enabled: true | ||
grafana: | ||
enabled: true | ||
kubeApiServer: | ||
enabled: false | ||
kubelet: | ||
enabled: false | ||
kubeControllerManager: | ||
enabled: false | ||
coreDns: | ||
enabled: false | ||
kubeDns: | ||
enabled: false | ||
kubeEtcd: | ||
enabled: false | ||
kubeScheduler: | ||
enabled: false | ||
kubeProxy: | ||
enabled: false | ||
kubeStateMetrics: | ||
enabled: false | ||
nodeExporter: | ||
enabled: false | ||
prometheusOperator: | ||
enabled: true | ||
resources: | ||
limits: | ||
cpu: 2 | ||
memory: 2Gi | ||
requests: | ||
cpu: 1 | ||
memory: 1Gi | ||
serviceMonitor: | ||
selfMonitor: false | ||
prometheus: | ||
enabled: true | ||
prometheusSpec: | ||
retention: 1d |
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
install/restapp-helm/Chart.yaml → install/realworld-helm/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
File renamed without changes.
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 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: {{ .Release.Name }}-realworld-frontend | ||
namespace: {{ .Release.Namespace }} | ||
labels: | ||
app: {{ .Release.Name }}-realworld-frontend | ||
spec: | ||
replicas: {{ .Values.frontend.replicas }} | ||
selector: | ||
matchLabels: | ||
app: {{ .Release.Name }}-realworld-frontend | ||
template: | ||
metadata: | ||
labels: | ||
app: {{ .Release.Name }}-realworld-frontend | ||
spec: | ||
containers: | ||
- name: realworld-frontend | ||
image: kbzjung359/realworld-frontend:realworld-localhost | ||
imagePullPolicy: Always | ||
resources: | ||
{{- toYaml .Values.frontend.resources | nindent 12 }} |
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,15 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: {{ .Release.Name }}-realworld-frontend | ||
namespace: {{ .Release.Namespace }} | ||
labels: | ||
app: {{ .Release.Name }}-realworld-frontend | ||
spec: | ||
selector: | ||
app: {{ .Release.Name }}-realworld-frontend | ||
ports: | ||
- name: http | ||
port: {{ .Values.frontend.service.port }} | ||
targetPort: 8080 | ||
type: {{ .Values.frontend.service.type }} |
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,19 @@ | ||
apiVersion: traefik.containo.us/v1alpha1 | ||
kind: IngressRoute | ||
metadata: | ||
name: {{ .Release.Name }} | ||
spec: | ||
entryPoints: | ||
- web | ||
- websecure | ||
routes: | ||
- match: Host(`realworld.{{ .Values.adminConfig.DOMAIN_NAME }}`) && PathPrefix(`/`) | ||
kind: Rule | ||
services: | ||
- name: {{ .Release.Name }}-realworld-frontend | ||
port: {{ .Values.frontend.service.port }} | ||
- match: Host(`realworld.{{ .Values.adminConfig.DOMAIN_NAME }}`) && PathPrefix(`/api`) | ||
kind: Rule | ||
services: | ||
- name: {{ .Release.Name }}-realworld-restapp | ||
port: {{ .Values.restapp.service.port }} |
15 changes: 15 additions & 0 deletions
15
install/realworld-helm/templates/realworld-servicemonitor.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,15 @@ | ||
apiVersion: monitoring.coreos.com/v1 | ||
kind: ServiceMonitor | ||
metadata: | ||
name: {{ .Release.Name }}-realworld-restapp | ||
labels: | ||
app: {{ .Release.Name }}-realworld-restapp | ||
release: observability | ||
namespace: default | ||
spec: | ||
selector: | ||
matchLabels: | ||
app: {{ .Release.Name }}-realworld-restapp | ||
endpoints: | ||
- port: "http" | ||
path: /metrics |
File renamed without changes.
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
File renamed without changes.
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