Skip to content

Commit

Permalink
Merge pull request #534 from robinmordasiewicz/dev99
Browse files Browse the repository at this point in the history
adding ks8
  • Loading branch information
robinmordasiewicz authored Aug 5, 2024
2 parents e7e3b68 + 1f5dba2 commit 4f367f8
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 31 deletions.
4 changes: 1 addition & 3 deletions manifests/apps/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ./ollama
- Ingress.yaml

- ./dvwa
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ spec:
service:
name: dvwa
port:
number: 80
number: 80
5 changes: 5 additions & 0 deletions manifests/ingress/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- Ingress.yaml
38 changes: 11 additions & 27 deletions terraform/spoke-k8s_cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ resource "azurerm_kubernetes_cluster_node_pool" "node-pool" {
name = "gpu"
mode = "User"
kubernetes_cluster_id = azurerm_kubernetes_cluster.kubernetes_cluster.id
depends_on = [azurerm_kubernetes_cluster.kubernetes_cluster]
vm_size = local.vm-image["aks"].gpu-size
node_count = 1
os_sku = "AzureLinux"
Expand All @@ -95,6 +94,7 @@ resource "azurerm_kubernetes_cluster_node_pool" "node-pool" {
os_disk_size_gb = "256"
max_pods = "50"
zones = ["1"]
vnet_subnet_id = azurerm_subnet.spoke_subnet.id
}

resource "null_resource" "kube_config" {
Expand All @@ -119,7 +119,7 @@ resource "azurerm_kubernetes_cluster_extension" "flux_extension" {
cluster_id = azurerm_kubernetes_cluster.kubernetes_cluster.id
extension_type = "microsoft.flux"
release_namespace = "flux-system"
depends_on = [azurerm_kubernetes_cluster_node_pool.node-pool]
depends_on = [azurerm_kubernetes_cluster.kubernetes_cluster]
configuration_settings = {
"image-automation-controller.enabled" = true,
"image-reflector-controller.enabled" = true,
Expand Down Expand Up @@ -147,34 +147,10 @@ resource "null_resource" "secret" {
name: fortiweb-ingress
---
apiVersion: v1
kind: Namespace
metadata:
name: dvwa
labels:
name: dvwa
---
apiVersion: v1
kind: Secret
metadata:
name: fortiweb-login-secret
namespace: dvwa
type: Opaque
data:
username: $(echo -n "${random_pet.admin_username.id}" | base64)
password: $(echo -n "${random_password.admin_password.result}" | base64)
---
apiVersion: v1
kind: Namespace
metadata:
name: ollama
labels:
name: ollama
---
apiVersion: v1
kind: Secret
metadata:
name: fortiweb-login-secret
namespace: ollama
namespace: fortiweb-ingress
type: Opaque
data:
username: $(echo -n "${random_pet.admin_username.id}" | base64)
Expand Down Expand Up @@ -219,6 +195,14 @@ resource "azurerm_kubernetes_flux_configuration" "flux_configuration" {
sync_interval_in_seconds = 60
depends_on = ["infrastructure"]
}
kustomizations {
name = "ingress"
recreating_enabled = true
garbage_collection_enabled = true
path = "./manifests/ingress"
sync_interval_in_seconds = 60
depends_on = ["apps"]
}
depends_on = [
azurerm_kubernetes_cluster_extension.flux_extension
]
Expand Down

0 comments on commit 4f367f8

Please sign in to comment.