Skip to content

Commit

Permalink
argocd: add shortlink-link
Browse files Browse the repository at this point in the history
Signed-off-by: Login Victor <batazor@evrone.com>
  • Loading branch information
batazor committed Aug 27, 2022
1 parent 95bd0bf commit 3c83316
Show file tree
Hide file tree
Showing 6 changed files with 67 additions and 27 deletions.
Binary file not shown.
Binary file not shown.
17 changes: 17 additions & 0 deletions ops/Helm/addons/argocd/templates/notifications.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: v1
kind: Secret
metadata:
name: argocd-notifications-secret
stringData:
slack-token: a5tA5KhnyF8eOrNi20RFT9N8
---

apiVersion: v1
kind: ConfigMap
metadata:
name: argocd-notifications-cm
data:
service.slack: |
token: $slack-token
username: argocd # optional username
icon: :dart: # optional icon for the message (supports both emoij and url notation)
18 changes: 8 additions & 10 deletions ops/Helm/addons/argocd/templates/shortlink/project.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,11 @@ spec:
- '*'
# Only permit applications to deploy to the guestbook namespace in the same cluster
destinations:
- namespace: shortlink
server: https://kubernetes.default.svc
roles:
# A role which provides read-only access to all applications in the project
- name: read-only
description: Read-only privileges to shortlink-oidc-group
policies:
- p, proj:shortlink-oidc-group:read-only, applications, get, shortlink-oidc-group/*, allow
groups:
- shortlink-oidc-group
- namespace: '*'
server: '*'
# Deny all cluster-scoped resources from being created, except for Namespace
clusterResourceWhitelist:
- group: '*'
kind: '*'
orphanedResources:
warn: true
50 changes: 33 additions & 17 deletions ops/Helm/addons/argocd/templates/shortlink/shortlink-link.yaml
Original file line number Diff line number Diff line change
@@ -1,17 +1,33 @@
{{/*apiVersion: argoproj.io/v1alpha1*/}}
{{/*kind: Application*/}}
{{/*metadata:*/}}
{{/* name: shortlink-link*/}}
{{/* namespace: argocd*/}}
{{/*spec:*/}}
{{/* project: shortlink*/}}
{{/* destination:*/}}
{{/* namespace: shortlink*/}}
{{/* server: https://kubernetes.default.svc*/}}
{{/* source:*/}}
{{/* path: ops/Helm/shortlink-link*/}}
{{/* repoURL: 'git@github.com:batazor/shortlink.git'*/}}
{{/* targetRevision: main*/}}
{{/* helm:*/}}
{{/* valueFiles:*/}}
{{/* - values.yaml*/}}
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: shortlink-link
finalizers:
- resources-finalizer.argocd.argoproj.io
spec:
destination:
name: in-cluster
namespace: shortlink
server: ''
source:
path: ops/Helm/shortlink-link
repoURL: 'git@github.com:batazor/shortlink.git'
targetRevision: HEAD
directory:
recurse: false
jsonnet:
tlas: []
project: shortlink
syncPolicy:
automated:
prune: true
selfHeal: true
syncOptions:
- CreateNamespace=true
retry:
limit: 2
backoff:
duration: 10s
maxDuration: 3m0s
factor: 2
---
9 changes: 9 additions & 0 deletions ops/Helm/addons/argocd/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,20 @@ argo-cd:
notifications:
argocdUrl: https://architecture.ddns.net/argocd

secret: {}

metrics:
enabled: true
serviceMonitor:
enabled: true

configs:
repositories:
shortlink:
url: https://github.com/batazor/shortlink
name: shortlink
type: git

argo-events:
fullnameOverride: argo-events

Expand Down

0 comments on commit 3c83316

Please sign in to comment.