diff --git a/.drone.yml b/.drone.yml index a359039..56c35de 100644 --- a/.drone.yml +++ b/.drone.yml @@ -70,6 +70,10 @@ steps: environment: KUBECONFIG_CONTENT: from_secret: KUBECONFIG_CONTENT + ARGO_GITHUB_OAUTH_KEY: + from_secret: GITHUB_OAUTH_KEY + ARGO_GOOGLE_OAUTH_KEY: + from_secret: GOOGLE_OAUTH_KEY commands: - mkdir $HOME/.kube - echo $KUBECONFIG_CONTENT | base64 -d > $HOME/.kube/config diff --git a/chart/Chart.lock b/chart/Chart.lock new file mode 100644 index 0000000..1647575 --- /dev/null +++ b/chart/Chart.lock @@ -0,0 +1,6 @@ +dependencies: +- name: remark42 + repository: https://groundhog2k.github.io/helm-charts/ + version: 0.5.5 +digest: sha256:975188682c1b89eca43ecfd655b70853c1c6dc6fbebd6a8da43cf3cac26f3d63 +generated: "2023-02-27T13:32:44.817705541+01:00" diff --git a/chart/Chart.yaml b/chart/Chart.yaml index e2d420e..db7da78 100644 --- a/chart/Chart.yaml +++ b/chart/Chart.yaml @@ -2,5 +2,11 @@ apiVersion: v2 name: badhouseplants-net description: A Helm chart for Kubernetes type: application -version: 0.4.2 -appVersion: "1.16.0" +version: 0.5.7 +appVersion: "4.20.0" +dependencies: + - name: remark42 + version: 0.5.5 + repository: https://groundhog2k.github.io/helm-charts/ + condition: remark42.enabled + diff --git a/chart/charts/remark42-0.5.5.tgz b/chart/charts/remark42-0.5.5.tgz new file mode 100644 index 0000000..79d8353 Binary files /dev/null and b/chart/charts/remark42-0.5.5.tgz differ diff --git a/chart/templates/virtual-service.yaml b/chart/templates/virtual-service.yaml index 652b4d0..0db7593 100644 --- a/chart/templates/virtual-service.yaml +++ b/chart/templates/virtual-service.yaml @@ -2,7 +2,7 @@ apiVersion: networking.istio.io/v1beta1 kind: VirtualService metadata: - name: blog-virtual-service + name: {{ include "badhouseplants-net.fullname" . }} labels: {{- include "badhouseplants-net.labels" . | nindent 4 }} {{- with .Values.istio.annotations }} @@ -26,3 +26,32 @@ spec: port: number: {{ .Values.service.port }} {{- end }} +--- +{{- if .Values.remark42.istio.enabled -}} +apiVersion: networking.istio.io/v1beta1 +kind: VirtualService +metadata: + name: {{ include "remark42.fullname" . }}-remark42 + labels: + {{- include "badhouseplants-net.labels" . | nindent 4 }} + {{- with .Values.remark42.istio.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + gateways: + - istio-system/badhouseplants-net + hosts: + {{- range .Values.remark42.istio.hosts}} + - {{ . }} + {{- end }} + http: + - match: + - uri: + prefix: {{ .Values.remark42.istio.prefix }} + route: + - destination: + host: {{ .Release.Name }}-remark42 + port: + number: {{ .Values.remark42.service.port }} +{{- end }} diff --git a/chart/values.yaml b/chart/values.yaml index de4d28b..8a40379 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -69,6 +69,31 @@ volumes: name: s3-data sizeLimit: 1Gi +remark42: + enabled: true + settings: + url: https://remark42.badhouseplants.net + secretKey: secret + emoji: true + auth: + anonymous: true + sameSite: "none" + oauth: + google: + enabled: true + key: "" + secret: "" + github: + enabled: true + key: "" + secret: "" + istio: + annotations: {} + enabled: true + hosts: + - remark42.badhouseplants.net + prefix: / + imagePullSecrets: [] nameOverride: "" fullnameOverride: "" diff --git a/config.yaml b/config.yaml index 0a5b237..97f5778 100644 --- a/config.yaml +++ b/config.yaml @@ -23,6 +23,8 @@ taxonomies: tag: tags params: GitBranch: main + Remark42ID: remark + Remark42URL: https://remark42-add-comments-dev.badhouseplants.net ShowBreadCrumbs: true ShowReadingTime: true ShowPostNavLinks: true @@ -64,3 +66,4 @@ outputs: - HTML - RSS - JSON + diff --git a/content/posts/argocd-vs-helmfile-application/index.md b/content/posts/argocd-vs-helmfile-application/index.md index 11c8ca7..61b858a 100644 --- a/content/posts/argocd-vs-helmfile-application/index.md +++ b/content/posts/argocd-vs-helmfile-application/index.md @@ -572,3 +572,6 @@ In the next post I will try doing the same with `ApplicationSets`, and we'll see Thanks, Oi! + + +{{< comments >}} \ No newline at end of file diff --git a/content/posts/argocd-vs-helmfile-helmfile/index.md b/content/posts/argocd-vs-helmfile-helmfile/index.md index 9272049..551cfd4 100644 --- a/content/posts/argocd-vs-helmfile-helmfile/index.md +++ b/content/posts/argocd-vs-helmfile-helmfile/index.md @@ -1583,3 +1583,4 @@ You can find an example of PR here: When helmfile is not GitOps? > To uninstall a helm release, you need to add `isntalled: false` to it. If you just remove a release from helmfile.yaml, it isn't going to be removed. So in such cases it's not GitOps. You can write a hook, that is comparing a previous state of your helmfile to the current one and doing a cleanup, then it's again fully GitOps. But I prefer removing things manually, so to me, it's not a problem. Removing stuff is something that I think should be mostly done by a human being, if it's not a part of your daily work. +{{< comments >}} diff --git a/kube/main.yaml b/kube/main.yaml index d12d607..8c33006 100644 --- a/kube/main.yaml +++ b/kube/main.yaml @@ -11,4 +11,18 @@ annotations: link.argocd.argoproj.io/env: https://badhouseplants.net/ link.argocd.argoproj.io/build: $DRONE_BUILD_LINK + link.argocd.argoproj.io/remark42: https://remark42-$ARGO_APP_HOSTNAME/web + remark42: + settings: + auth: + anonymous: false + oauth: + github: + key: 1fb3d33a62b074bc0ea0 + secret: $ARGO_GITHUB_OAUTH_KEY + google: + key: 966815964055-m9t7leuj1arqimqu2pvbs1k10cg54gcg.apps.googleusercontent.com + secret: $ARGO_GOOGLE_OAUTH_KEY + storage: + requestedSize: 300Mi diff --git a/kube/template.yaml b/kube/template.yaml index 4d59e17..9758dcf 100644 --- a/kube/template.yaml +++ b/kube/template.yaml @@ -12,6 +12,7 @@ - $ARGO_APP_HOSTNAME annotations: link.argocd.argoproj.io/env: https://$ARGO_APP_HOSTNAME/ + link.argocd.argoproj.io/remark42: https://remark42-$ARGO_APP_HOSTNAME/web link.argocd.argoproj.io/build: $DRONE_BUILD_LINK hugo: image: @@ -20,3 +21,11 @@ buildDrafts: true env: HUGO_PARAMS_GITBRANCH: $ARGO_APP_BRANCH + HUDO_PARAMS_REMARK42URL: https://remark42-$ARGO_APP_HOSTNAME/ + remark42: + istio: + hosts: + - remark42-$ARGO_APP_HOSTNAME + settings: + url: https://remark42-$ARGO_APP_HOSTNAME/ + diff --git a/layouts/partials/remark42.html b/layouts/partials/remark42.html new file mode 100644 index 0000000..a97ae63 --- /dev/null +++ b/layouts/partials/remark42.html @@ -0,0 +1,11 @@ +
+ + diff --git a/layouts/shortcodes/comments.html b/layouts/shortcodes/comments.html new file mode 100644 index 0000000..bf60497 --- /dev/null +++ b/layouts/shortcodes/comments.html @@ -0,0 +1 @@ +{{ partial "remark42.html" . }}