{"id":29071388,"url":"https://github.com/selectel/external-dns-selectel-webhook","last_synced_at":"2025-06-27T13:30:35.325Z","repository":{"id":229705597,"uuid":"775403653","full_name":"selectel/external-dns-selectel-webhook","owner":"selectel","description":"ExternalDNS webhook provider to manage Selectel DNS records","archived":false,"fork":false,"pushed_at":"2025-02-12T19:29:14.000Z","size":14236,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-31T20:37:55.331Z","etag":null,"topics":["dns","kubernetes","selectel","webhook"],"latest_commit_sha":null,"homepage":"https://selectel.com","language":"Go","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"stackitcloud/external-dns-stackit-webhook","license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/selectel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-03-21T10:24:31.000Z","updated_at":"2025-02-13T06:26:35.000Z","dependencies_parsed_at":null,"dependency_job_id":"2ab6a408-b700-498e-a4f3-1493946198b5","html_url":"https://github.com/selectel/external-dns-selectel-webhook","commit_stats":null,"previous_names":["selectel/external-dns-selectel-webhook","selectel/external-dns-stackit-webhook"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/selectel/external-dns-selectel-webhook","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/selectel%2Fexternal-dns-selectel-webhook","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/selectel%2Fexternal-dns-selectel-webhook/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/selectel%2Fexternal-dns-selectel-webhook/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/selectel%2Fexternal-dns-selectel-webhook/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/selectel","download_url":"https://codeload.github.com/selectel/external-dns-selectel-webhook/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/selectel%2Fexternal-dns-selectel-webhook/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262264876,"owners_count":23284403,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dns","kubernetes","selectel","webhook"],"created_at":"2025-06-27T13:30:29.817Z","updated_at":"2025-06-27T13:30:35.322Z","avatar_url":"https://github.com/selectel.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Selectel Webhook - ExternalDNS\n\n[![GoTemplate](https://img.shields.io/badge/go/template-black?logo=go)](https://github.com/golang-standards/project-layout)\n[![CI](https://github.com/selectel/external-dns-selectel-webhook/actions/workflows/main.yml/badge.svg)](https://github.com/selectel/external-dns-selectel-webhook/actions/workflows/main.yml)\n[![Go Report Card](https://goreportcard.com/badge/github.com/selectel/external-dns-selectel-webhook)](https://goreportcard.com/report/github.com/selectel/external-dns-selectel-webhook)\n[![GitHub release](https://img.shields.io/github/release/selectel/external-dns-selectel-webhook.svg)](https://github.com/selectel/external-dns-selectel-webhook/releases)\n[![Last Commit](https://img.shields.io/github/last-commit/selectel/external-dns-selectel-webhook/main.svg)](https://github.com/selectel/external-dns-selectel-webhook/commits/main)\n[![GitHub issues](https://img.shields.io/github/issues/selectel/external-dns-selectel-webhook.svg)](https://github.com/selectel/external-dns-selectel-webhook/issues)\n[![GitHub pull requests](https://img.shields.io/github/issues-pr/selectel/external-dns-selectel-webhook.svg)](https://github.com/selectel/external-dns-selectel-webhook/pulls)\n[![GitHub stars](https://img.shields.io/github/stars/selectel/external-dns-selectel-webhook.svg?style=social\u0026label=Star\u0026maxAge=2592000)](https://github.com/selectel/external-dns-selectel-webhook/stargazers)\n[![GitHub forks](https://img.shields.io/github/forks/selectel/external-dns-selectel-webhook.svg?style=social\u0026label=Fork\u0026maxAge=2592000)](https://github.com/selectel/external-dns-selectel-webhook/network)\n\nExternalDNS serves as an add-on for Kubernetes designed to automate the management of Domain Name System (DNS)\nrecords for Kubernetes services by utilizing various DNS providers. While Kubernetes traditionally manages DNS\nrecords internally, ExternalDNS augments this functionality by transferring the responsibility of DNS records\nmanagement to an external DNS provider such as Selectel. Consequently, the Selectel webhook enables the management\nof your Selectel domains within your Kubernetes cluster using\n[ExternalDNS](https://github.com/kubernetes-sigs/external-dns).\n\nFor utilizing ExternalDNS with Selectel, it is mandatory to establish a Selectel project, a service account\nwithin the project, and finally, establish a domain zone.\n\n## Kubernetes Deployment\n\nThe Selectel webhook is presented as a standard Open Container Initiative (OCI) image released in the\n[GitHub container registry](https://github.com/selectel/external-dns-selectel-webhook/pkgs/container/external-dns-selectel-webhook).\nThe deployment is compatible with all Kubernetes-supported methods. The subsequent example\ndemonstrates the deployment as a\n[sidecar container](https://kubernetes.io/docs/concepts/workloads/pods/#workload-resources-for-managing-pods)\nwithin the ExternalDNS pod.\n\n```shell \nkubectl create secret generic external-dns-selectel-webhook --from-literal=password='\u003cService-User-Password\u003e'\n```\n\n```shell\nkubectl apply -f - \u003c\u003cEOF\napiVersion: v1\nkind: ServiceAccount\nmetadata:\n  name: external-dns\n  namespace: default\n  labels:\n    app.kubernetes.io/name: external-dns\n    app.kubernetes.io/instance: external-dns\n---\napiVersion: rbac.authorization.k8s.io/v1\nkind: ClusterRole\nmetadata:\n  name: external-dns\n  labels:\n    app.kubernetes.io/name: external-dns\n    app.kubernetes.io/instance: external-dns\nrules:\n  - apiGroups: [\"\"]\n    resources: [\"nodes\"]\n    verbs: [\"list\",\"watch\"]\n  - apiGroups: [\"\"]\n    resources: [\"pods\"]\n    verbs: [\"get\",\"watch\",\"list\"]\n  - apiGroups: [\"\"]\n    resources: [\"services\",\"endpoints\"]\n    verbs: [\"get\",\"watch\",\"list\"]\n  - apiGroups: [\"extensions\",\"networking.k8s.io\"]\n    resources: [\"ingresses\"]\n    verbs: [\"get\",\"watch\",\"list\"]\n---\napiVersion: rbac.authorization.k8s.io/v1\nkind: ClusterRoleBinding\nmetadata:\n  name: external-dns-viewer\n  labels:\n    app.kubernetes.io/name: external-dns\n    app.kubernetes.io/instance: external-dns\nroleRef:\n  apiGroup: rbac.authorization.k8s.io\n  kind: ClusterRole\n  name: external-dns\nsubjects:\n  - kind: ServiceAccount\n    name: external-dns\n    namespace: default\n---\napiVersion: v1\nkind: Service\nmetadata:\n  name: external-dns\n  namespace: default\n  labels:\n    app.kubernetes.io/name: external-dns\n    app.kubernetes.io/instance: external-dns\nspec:\n  type: ClusterIP\n  selector:\n    app.kubernetes.io/name: external-dns\n    app.kubernetes.io/instance: external-dns\n  ports:\n    - name: http\n      port: 7979\n      targetPort: http\n      protocol: TCP\n---\napiVersion: apps/v1\nkind: Deployment\nmetadata:\n  name: external-dns\n  namespace: default\n  labels:\n    app.kubernetes.io/name: external-dns\n    app.kubernetes.io/instance: external-dns\nspec:\n  replicas: 1\n  selector:\n    matchLabels:\n      app.kubernetes.io/name: external-dns\n      app.kubernetes.io/instance: external-dns\n  strategy:\n    type: Recreate\n  template:\n    metadata:\n      labels:\n        app.kubernetes.io/name: external-dns\n        app.kubernetes.io/instance: external-dns\n    spec:\n      serviceAccountName: external-dns\n      securityContext:\n        fsGroup: 65534\n      containers:\n        - name: external-dns\n          securityContext:\n            capabilities:\n              drop:\n              - ALL\n            readOnlyRootFilesystem: true\n            runAsNonRoot: true\n            runAsUser: 65534\n          image: registry.k8s.io/external-dns/external-dns:v0.14.0\n          imagePullPolicy: IfNotPresent\n          args:\n            - --log-level=info\n            - --log-format=text\n            - --interval=1m\n            - --source=service\n            - --source=ingress\n            - --policy=sync # set it upsert-only if you don't want it to delete records\n            - --provider=webhook\n          ports:\n            - name: http\n              protocol: TCP\n              containerPort: 7979\n          livenessProbe:\n            failureThreshold: 2\n            httpGet:\n              path: /healthz\n              port: http\n            initialDelaySeconds: 10\n            periodSeconds: 10\n            successThreshold: 1\n            timeoutSeconds: 5\n          readinessProbe:\n            failureThreshold: 6\n            httpGet:\n              path: /healthz\n              port: http\n            initialDelaySeconds: 5\n            periodSeconds: 10\n            successThreshold: 1\n            timeoutSeconds: 5\n        - name: webhook\n          securityContext:\n            capabilities:\n              drop:\n                - ALL\n            readOnlyRootFilesystem: true\n            runAsNonRoot: true\n            runAsUser: 65534\n          image: ghcr.io/selectel/external-dns-selectel-webhook:v0.1.0\n          imagePullPolicy: IfNotPresent\n          args:\n            - --project-id=4027de78158a410fb7c64c65af940f96 # your project id\n            - --account-id=000000 # your account id\n            - --username=Username # your service user's name\n          ports:\n            - name: http\n              protocol: TCP\n              containerPort: 8888\n          livenessProbe:\n            failureThreshold: 2\n            httpGet:\n              path: /healthz\n              port: http\n            initialDelaySeconds: 10\n            periodSeconds: 10\n            successThreshold: 1\n            timeoutSeconds: 5\n          readinessProbe:\n            failureThreshold: 6\n            httpGet:\n              path: /healthz\n              port: http\n            initialDelaySeconds: 5\n            periodSeconds: 10\n            successThreshold: 1\n            timeoutSeconds: 5\n          env:\n            - name: PASSWORD\n              valueFrom:\n                secretKeyRef:\n                  name: external-dns-selectel-webhook\n                  key: password\nEOF\n```\n\n## Configuration\n\nThe configuration of the Selectel webhook can be accomplished through command line arguments and environment variables.\nBelow are the options that are available in format `--cli-argument`/`ENVIRONMENT_VARIABLE`.\n\n- `--project-id`/`PROJECT_ID` (required): Specifies the project id to authorize.\n- `--account-id`/`ACCOUNT_ID` (required): Specifies the account id to authorize.\n- `--username`/`USERNAME` (required): Specifies the username of your service user to authorize.\n- `--password`/`PASSWORD` (required): Specifies the password of your service user to authorize.\n- `--worker`/`WORKER`  (optional): Specifies the number of workers to employ for querying the API. Given that we\n  need to iterate over all zones and records, it can be parallelized. However, it is important to avoid\n  setting this number excessively high to prevent receiving 429 rate limiting from the API (default 10).\n- `--base-url`/`BASE_URL` (optional): Identifies the Base URL for utilizing the API\n  (default \"https://api.selectel.ru/domains/v2\"). The full list of Selectel API URLs you can\n  see [here](https://developers.selectel.ru/docs/control-panel/urls/).\n- `--auth-url`/`AUTH_URL` (optional): Identifies the URL for utilizing the API to receive keystone-token\n  (default \"https://cloud.api.selcloud.ru/identity/v3\").\n- `--api-port`/`API_PORT` (optional): Specifies the port to listen on (default 8888).\n- `--domain-filter`/`DOMAIN_FILER` (optional): Establishes a filter for DNS zone names (default []).\n- `--dry-run`/`DRY_RUN` (optional): Specifies whether to perform a dry run (default false).\n- `--log-level`/`LOG_LEVEL` (optional): Defines the log level (default \"info\"). Possible values are: debug, info, warn,\n  error.\n\n## Development\n\nRun the app:\n\n```bash\nexport PROJECT_ID=\"c158c736-0300-4044-95c4-b7d404279b35\"\nexport ACCOUNT_ID=\"123456\"\nexport USERNAME=\"username\"\nexport PASSWORD =\"password\"\n\nmake run\n```\n\nLint the code:\n\n```bash\nmake lint\n```\n\nTest the code:\n\n```bash\nmake test\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fselectel%2Fexternal-dns-selectel-webhook","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fselectel%2Fexternal-dns-selectel-webhook","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fselectel%2Fexternal-dns-selectel-webhook/lists"}