Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
andreyev committed Nov 5, 2024
1 parent ff8799b commit a383817
Show file tree
Hide file tree
Showing 5 changed files with 110 additions and 64 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/install-prometheus-operator.yml-bck
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Install Prometheus Operator using Terraform and Helm in Docker

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
install-prometheus-operator:
runs-on: self-hosted

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up Terraform
uses: hashicorp/setup-terraform@v1
with:
terraform_version: 1.0.0

- name: Run Helm in Docker
run: |
docker run --rm \
--network host \
-v ${{ github.workspace }}/monitoring:/workspace \
-v $HOME/.kube:/root/.kube \
# -v $HOME/.terraform.d:/root/.terraform.d \
# -e TF_PLUGIN_CACHE_DIR=/root/.terraform.d \
# -w /workspace \
alpine:3.20 \
sh -c "
apk add --no-cache curl bash tar gzip;
# curl https://get.helm.sh/helm-v3.8.0-linux-amd64.tar.gz | tar zxvf -;
# mv linux-amd64/helm /usr/local/bin/helm;
# curl -sO https://releases.hashicorp.com/terraform/1.0.0/terraform_1.0.0_linux_amd64.zip;
# unzip terraform_1.0.0_linux_amd64.zip;
# chmod +x terraform;
# cd /workspace;
# ./terraform init;
# ./terraform apply -auto-approve;
"
37 changes: 37 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Local .terraform directories
**/.terraform/*

# .tfstate files
*.tfstate
*.tfstate.*

# Crash log files
crash.log
crash.*.log

# Exclude all .tfvars files, which are likely to contain sensitive data, such as
# password, private keys, and other secrets. These should not be part of version
# control as they are data points which are potentially sensitive and subject
# to change depending on the environment.
*.tfvars
*.tfvars.json

# Ignore override files as they are usually used to override resources locally and so
# are not checked in
override.tf
override.tf.json
*_override.tf
*_override.tf.json

# Ignore transient lock info files created by terraform apply
.terraform.tfstate.lock.info

# Include override files you do wish to add to version control using negated pattern
# !example_override.tf

# Include tfplan files to ignore the plan output of command: terraform plan -out=tfplan
# example: *tfplan*

# Ignore CLI configuration files
.terraformrc
terraform.rc
29 changes: 29 additions & 0 deletions applicationset.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
name: applicationset-manager
namespace: argocd
spec:
generators:
- git:
repoURL: 'https://github.com/lhc/k8s1.git'
revision: 'main'
directories:
- path: '/applicationsets'
template:
metadata:
name: '{{path.basename}}'
spec:
project: default
source:
repoURL: 'https://github.com/lhc/k8s1.git'
targetRevision: 'main'
path: '{{path}}'
destination:
server: 'https://kubernetes.default.svc'
namespace: argocd
syncPolicy:
automated:
prune: true
selfHeal: true

File renamed without changes.
64 changes: 0 additions & 64 deletions monitoring/main.tf

This file was deleted.

0 comments on commit a383817

Please # to comment.