Latest stable
This commit is contained in:
1 parent
a68f3664ea
commit
95c52f768d
6 files changed
+31
-76
No files matched your search
@@ -2,4 +2,4 @@ apiVersion: v2
|
||||
name: cluster
|
||||
description: An infrastructure collection of manifests for homelab
|
||||
type: application
|
||||
version: 0.1.1
|
||||
version: 0.1.2
|
||||
@@ -1,49 +0,0 @@
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: registry
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: registry
|
||||
replicas: 1
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: registry
|
||||
spec:
|
||||
containers:
|
||||
- name: registry
|
||||
image: "{{ .Values.registry.image }}"
|
||||
ports:
|
||||
- containerPort: 5000
|
||||
volumeMounts:
|
||||
- name: storage
|
||||
mountPath: /var/lib/registry
|
||||
env:
|
||||
- name: REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY
|
||||
value: /var/lib/registry
|
||||
resources:
|
||||
requests:
|
||||
cpu: 0.1
|
||||
memory: 250Mi
|
||||
volumes:
|
||||
- name: storage
|
||||
nfs:
|
||||
server: "{{ .Values.global.nfs.server }}"
|
||||
path: "{{ .Values.global.nfs.rootPath }}/docker-registry"
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: registry
|
||||
annotations:
|
||||
metallb.universe.tf/loadBalancerIPs: "{{ .Values.registry.ip }}"
|
||||
spec:
|
||||
type: LoadBalancer
|
||||
ports:
|
||||
- port: 80
|
||||
targetPort: 5000
|
||||
selector:
|
||||
app: registry
|
||||
@@ -1,7 +1,3 @@
|
||||
# pihole:
|
||||
# ip: 10.0.100.100
|
||||
# image: pihole/pihole:latest
|
||||
|
||||
registry:
|
||||
ip: 10.0.100.101
|
||||
image: registry:2
|
||||
@@ -41,7 +41,7 @@ resource "cloudflare_dns_record" "this" {
|
||||
zone_id = each.value.zone_id
|
||||
comment = local.record_comment
|
||||
content = each.value.ip
|
||||
name = each.value.record
|
||||
name = each.key
|
||||
type = each.value.type
|
||||
proxied = false
|
||||
ttl = 1
|
||||
|
||||
+25
-18
@@ -1,21 +1,28 @@
|
||||
|
||||
# resource "helm_release" "local-chart-infrastructure" {
|
||||
# name = "infrastructure"
|
||||
# chart = "charts/infrastructure"
|
||||
# namespace = "default"
|
||||
# set = [{
|
||||
# name = "ns.metallb"
|
||||
# value = module.k8s-helm-charts.namespaces.plugins.metallb
|
||||
# }]
|
||||
# values = [file("./values.yaml")]
|
||||
# timeout = 120
|
||||
# force_update = true
|
||||
# }`
|
||||
resource "helm_release" "local-chart-infrastructure" {
|
||||
name = "infrastructure"
|
||||
chart = "charts/infrastructure"
|
||||
namespace = "default"
|
||||
set = [{
|
||||
name = "ns.metallb"
|
||||
value = module.k8s-helm-charts.namespaces.plugins.metallb
|
||||
}]
|
||||
values = [file("./values.yaml")]
|
||||
timeout = 120
|
||||
force_update = true
|
||||
}
|
||||
|
||||
# module "k8s-helm-charts" {
|
||||
# source = "./tf-modules/k8s-helm-charts"
|
||||
# }
|
||||
module "k8s-helm-charts" {
|
||||
source = "./tf-modules/k8s-helm-charts"
|
||||
}
|
||||
|
||||
# output "ns" {
|
||||
# value = module.k8s-helm-charts.namespaces
|
||||
# }
|
||||
output "ns" {
|
||||
value = module.k8s-helm-charts.namespaces
|
||||
}
|
||||
|
||||
|
||||
resource "kubernetes_namespace" "test" {
|
||||
metadata {
|
||||
name = "test"
|
||||
}
|
||||
}
|
||||
+4
-3
@@ -1,7 +1,8 @@
|
||||
terraform {
|
||||
backend "kubernetes" {
|
||||
secret_suffix = "homelab"
|
||||
namespace = "default"
|
||||
secret_suffix = "homelab"
|
||||
namespace = "default"
|
||||
config_context = "homelab"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,7 +28,7 @@ terraform {
|
||||
}
|
||||
|
||||
provider "helm" {
|
||||
kubernetes {
|
||||
kubernetes = {
|
||||
config_context = "homelab"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user