diff --git a/argocd-stack/docs.yaml b/argocd-stack/docs.yaml new file mode 100644 index 0000000..f298c98 --- /dev/null +++ b/argocd-stack/docs.yaml @@ -0,0 +1,28 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: docs + namespace: argocd + labels: + env: prod +spec: + project: default + syncPolicy: + automated: + selfHeal: true + syncOptions: + - CreateNamespace=true + - ServerSideApply=true + destination: + name: in-cluster + namespace: docs + syncOptions: + - CreateNamespace=true + sources: + - repoURL: https://edp.buildth.ing/DevFW-CICD/website-and-documentation + targetRevision: HEAD + path: argocd-stack/helm + helm: + parameters: + - name: image.tag + value: $ARGOCD_APP_REVISION_SHORT \ No newline at end of file diff --git a/argocd-stack/helm/.helmignore b/argocd-stack/helm/.helmignore new file mode 100644 index 0000000..0e8a0eb --- /dev/null +++ b/argocd-stack/helm/.helmignore @@ -0,0 +1,23 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*.orig +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/argocd-stack/helm/Chart.yaml b/argocd-stack/helm/Chart.yaml new file mode 100644 index 0000000..1bf09dc --- /dev/null +++ b/argocd-stack/helm/Chart.yaml @@ -0,0 +1,24 @@ +apiVersion: v2 +name: helm +description: Deploy documentation to edp.buildth.ing + +# A chart can be either an 'application' or a 'library' chart. +# +# Application charts are a collection of templates that can be packaged into versioned archives +# to be deployed. +# +# Library charts provide useful utilities or functions for the chart developer. They're included as +# a dependency of application charts to inject those utilities and functions into the rendering +# pipeline. Library charts do not define any templates and therefore cannot be deployed. +type: application + +# This is the chart version. This version number should be incremented each time you make changes +# to the chart and its templates, including the app version. +# Versions are expected to follow Semantic Versioning (https://semver.org/) +version: 0.1.0 + +# This is the version number of the application being deployed. This version number should be +# incremented each time you make changes to the application. Versions are not expected to +# follow Semantic Versioning. They should reflect the version the application is using. +# It is recommended to use it with quotes. +appVersion: "1.16.0" diff --git a/argocd-stack/helm/templates/deploy.yaml b/argocd-stack/helm/templates/deploy.yaml new file mode 100644 index 0000000..10fe286 --- /dev/null +++ b/argocd-stack/helm/templates/deploy.yaml @@ -0,0 +1,62 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app: docs + name: docs +spec: + replicas: 1 + selector: + matchLabels: + app: docs + strategy: {} + template: + metadata: + labels: + app: docs + spec: + containers: + - image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" + name: docs + ports: + - name: http + containerPort: 4050 + protocol: TCP + resources: {} +--- +apiVersion: v1 +kind: Service +metadata: + name: docs +spec: + selector: + app: docs + ports: + - protocol: TCP + port: 80 + targetPort: 4050 +--- +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: docs + annotations: + cert-manager.io/cluster-issuer: main + nginx.ingress.kubernetes.io/force-ssl-redirect: "true" +spec: + ingressClassName: nginx + rules: + - host: docs.edp.buildth.ing + http: + paths: + - backend: + service: + name: docs + port: + number: 80 + path: / + pathType: Prefix + tls: + - hosts: + - docs.edp.buildth.ing + secretName: docs-edp-buildth-ing-tls diff --git a/argocd-stack/helm/values.yaml b/argocd-stack/helm/values.yaml new file mode 100644 index 0000000..78c3c27 --- /dev/null +++ b/argocd-stack/helm/values.yaml @@ -0,0 +1,4 @@ + +image: + repository: edp.buildth.ing/devfw-cicd/website-and-documentation + tag: "UNKNOWN_TAG"