feat: use the built-in plugin feature

This commit is contained in:
Nikolai Rodionov 2023-03-02 13:27:57 +01:00 committed by Nikolai Rodionov
parent d6270a4850
commit d5686e0aab
6 changed files with 25 additions and 6 deletions

View File

@ -70,14 +70,15 @@ steps:
environment: environment:
KUBECONFIG_CONTENT: KUBECONFIG_CONTENT:
from_secret: KUBECONFIG_CONTENT from_secret: KUBECONFIG_CONTENT
commands: commands:
- mkdir $HOME/.kube - mkdir $HOME/.kube
- echo $KUBECONFIG_CONTENT | base64 -d > $HOME/.kube/config - echo $KUBECONFIG_CONTENT | base64 -d > $HOME/.kube/config
- apk update --no-cache && apk add yq gettext - apk update --no-cache && apk add yq gettext openssl
- export ARGO_APP_CHART_VERSION=`cat chart/Chart.yaml | yq '.version'` - export ARGO_APP_CHART_VERSION=`cat chart/Chart.yaml | yq '.version'`
- export ARGO_APP_BRANCH=$DRONE_BRANCH - export ARGO_APP_BRANCH=$DRONE_BRANCH
- export ARGO_APP_HOSTNAME="${DRONE_BRANCH}-dev.badhouseplants.net" - export ARGO_APP_HOSTNAME="${DRONE_BRANCH}-dev.badhouseplants.net"
- export ARGO_APP_IMAGE_TAG=$DRONE_COMMIT_SHA - export ARGO_APP_IMAGE_TAG=$DRONE_COMMIT_SHA
- export ARGO_REMARK42_SECRET=$(openssl rand -hex 12)
- kubectl get -f ./kube/applicationset.yaml -o yaml > /tmp/appset.yaml - kubectl get -f ./kube/applicationset.yaml -o yaml > /tmp/appset.yaml
- yq -i "del(.metadata.resourceVersion)" /tmp/appset.yaml - yq -i "del(.metadata.resourceVersion)" /tmp/appset.yaml
- yq -i "del(.metadata.generation)" /tmp/appset.yaml - yq -i "del(.metadata.generation)" /tmp/appset.yaml

View File

@ -29,6 +29,7 @@ params:
ShowReadingTime: true ShowReadingTime: true
ShowPostNavLinks: true ShowPostNavLinks: true
ShowCodeCopyButtons: true ShowCodeCopyButtons: true
comments: true
profileMode: profileMode:
enabled: true enabled: true
title: "Bad Houseplants" title: "Bad Houseplants"

View File

@ -573,4 +573,3 @@ Thanks,
Oi! Oi!
{{< comments >}}

View File

@ -1583,4 +1583,6 @@ You can find an example of PR here: <https://git.badhouseplants.net/allanger/hel
> When helmfile is not GitOps? > 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. > 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 >}} Thanks,
Oi!

View File

@ -21,7 +21,7 @@
buildDrafts: true buildDrafts: true
env: env:
HUGO_PARAMS_GITBRANCH: $ARGO_APP_BRANCH HUGO_PARAMS_GITBRANCH: $ARGO_APP_BRANCH
HUDO_PARAMS_REMARK42URL: https://remark42-$ARGO_APP_HOSTNAME/ HUGO_PARAMS_REMARK42URL: https://remark42-$ARGO_APP_HOSTNAME
remark42: remark42:
istio: istio:
hosts: hosts:
@ -30,4 +30,4 @@
url: https://remark42-$ARGO_APP_HOSTNAME/ url: https://remark42-$ARGO_APP_HOSTNAME/
auth: auth:
anonymous: true anonymous: true
secretKey: $ARGO_REMARK42_SECRET

View File

@ -0,0 +1,16 @@
<hr>
<blockquote>
<p> Comments are in the beta testing stage. </p>
</blockquote>
<div id="remark42"></div>
<script>
var theme = "light"
if (document.body.classList.contains("dark")) theme = "dark";
var remark_config = {
host: "{{ site.Params.Remark42URL }}",
site_id: "{{ site.Params.Remark42ID }}",
theme: theme
}
</script>
<script>!function(e,n){for(var o=0;o<e.length;o++){var r=n.createElement("script"),c=".js",d=n.head||n.body;"noModule"in r?(r.type="module",c=".mjs"):r.async=!0,r.defer=!0,r.src=remark_config.host+"/web/"+e[o]+c,d.appendChild(r)}}(remark_config.components||["embed"],document);</script>