Sign inSign up

nox404/dynhost-ovh

By nox404

•Updated over 4 years ago

https://gitea.krondor.fr/nox/dynhost-ovh

Image
0

409

nox404/dynhost-ovh repository overview

⁠dynhost-ovh

A simple cronjob to update DynHost on OVH hosting.

⁠Introduction

This repo provides a script to retrieve the public ip of an host and set a dynhost on OVH accordingly.

A docker image and a Chart is also provided for deployment on kubernetes.

You may also just use cron to run the script.

⁠Prerequisites

⁠If using the Chart
  • Kubernetes 1.21
  • helm 3.6.3

Other versions might work but were not tested.

⁠If running on the host
  • curl - HTTP calls
  • dig - DNS lookup

⁠Installing the Chart

To install the chart:

git clone [REPO_CLONE_URL] && cd dynhost-ovh
helm install [RELEASE] chart \
  --set dynhost.host=[DYNHOST_HOST] \
  --set dynhost.login=[DYNHOST_USERNAME] \
  --set dynhost.password=[DYNHOST_PASSWORD]

Make sure to replace the [...] accordingly.

You may also use a values.yaml file using helm install -f [FILE] ...

⁠Uninstalling the Chart

helm delete [RELEASE]

⁠Chart parameters

⁠Common parameters
NameDescriptionValue
dynhost.host*The dynhost DNS name to update""
dynhost.login*The dynhost identifier""
dynhost.password*The dynhost password""
dynhost.externalSecretNameThe name of a secret containing the script's parameters to use instead of creating one""
suspendWether to suspend the cron or notno
scheduleThe schedule of the cronjob. Use cron syntax0 * * * * (every hour)
image.repositoryThe docker image repositorynox404/dynhost-ovh
image.tagThe docker image tag1.0.0

* dynhost.host, dynhost.login, dynhost.password are Mandatory unless you provide an external secret with dynhost.externalSecretName.

⁠Extended parameters
NameDescriptionValue
cronjobApiVersionUse this if the cronjob api has a different version in your clusterbatch/v1beta1
failedJobsHistoryLimitThe number of failed jobs to keep1
successfulJobsHistoryLimitThe number of successful jobs to keep1
backoffLimitThe number of retries to attempt when the job fails0
image.pullPolicyImage pull policyIfNotPresent
imagePullSecretsSpecify image pull secrets[]
serviceAccount.createWether to create a service accounttrue
serviceAccount.nameName of the service account to create and/or use""
podAnnotationsExtra pod annotations{}
podSecurityContextThe pod security context{}
securityContextThe container security context{}
resourcesSpecify container resources{}
nodeSelectorConstrain the pod to specific nodes{}
tolerationsPod tolerations[]
affinityPod affinities{}

⁠Script parameters

The script uses environment variable as parameters.

NameDescriptionValue
HOSTMandatory - The dynhost DNS name to update""
LOGINMandatory - The dynhost identifier""
PASSWORDMandatory - The dynhost password""

⁠Building and publishing the Docker image

git clone [REPO_CLONE_URL] && cd dynhost-ovh
docker build -f docker/Dockerfile -t [REPOSITORY]:[TAG] .
docker push [REPOSITORY]:[TAG]

Tag summary

Content type

Image

Digest

Size

6.7 MB

Last updated

over 4 years ago

docker pull nox404/dynhost-ovh