Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions deployments/stacks/dpe-k8s-deployments/deployments.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: flask-helloworld
labels:
app: flask-helloworld
spec:
replicas: 1
selector:
matchLabels:
app: flask-helloworld
template:
metadata:
labels:
app: flask-helloworld
spec:
containers:
- name: flask
image: digitalocean/flask-helloworld:latest
ports:
- containerPort: 5000
38 changes: 38 additions & 0 deletions deployments/stacks/dpe-k8s-deployments/main.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,44 @@
locals {
git_revision = var.git_revision

# Rename this to the name of your branch
my_branch_name = "dpe-1193"
# Set this to a unique name
my_namespace_name = "linglp-cool-namespace"
# Set this to a unique name
my_application_name_in_argocd = "linglp-cool-application"
}

resource "kubernetes_namespace" "linglp-cool-resource" {
metadata {
name = local.my_namespace_name
}
}

resource "kubectl_manifest" "my-argocd-application" {
depends_on = [kubernetes_namespace.linglp-cool-resource]

yaml_body = <<YAML
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: ${local.my_application_name_in_argocd}
namespace: argocd
spec:
project: default
syncPolicy:
automated:
prune: true
sources:
- repoURL: 'https://github.com/Sage-Bionetworks-Workflows/eks-stack.git'
targetRevision: ${local.my_branch_name}
path: deployments/stacks/dpe-k8s-deployments
destination:
server: 'https://kubernetes.default.svc'
namespace: ${local.my_namespace_name}
YAML
}

module "sage-aws-eks-autoscaler" {
source = "spacelift.io/sagebionetworks/sage-aws-eks-autoscaler/aws"
version = "0.9.0"
Expand Down
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,4 @@ module "deployments" {
org_sagebase_dnt_dev_aws_integration_id = module.common.org_sagebase_dnt_dev_aws_integration_id
org_sagebase_dpe_prod_aws_integration_id = module.common.org_sagebase_dpe_prod_aws_integration_id
git_branch = local.git_branch
}
}