Skip to content

Commit

Permalink
Yandex Cloud DNS provider for Caddyserver
Browse files Browse the repository at this point in the history
Co-authored-by: Mikhail Parfenov <[email protected]>

Co-authored-by: Roman Dyakov <[email protected]>

Co-authored-by: Roman Dyakov <[email protected]>
  • Loading branch information
mixx3 and dyakovri committed Aug 4, 2024
1 parent 116f0a1 commit ca0bb58
Show file tree
Hide file tree
Showing 6 changed files with 231 additions and 1,098 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Go

on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [ '1.21.5' ]

steps:
- uses: actions/checkout@v4
- name: Setup Go ${{ matrix.go-version }}
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- name: Display Go version
run: go version
- name: Install deps
run: go get
- name: Build
run: go build
# - name: Test with the Go CLI
# run: go test
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) <YEAR AND NAME>
Copyright (c) 2024, Профком студентов физфака МГУ

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
55 changes: 22 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,11 @@
**DEVELOPER INSTRUCTIONS:**
# Yandex Cloud module for Caddy

- Update module name in go.mod
- Update dependencies to latest versions
- Update name and year in license
- Customize configuration and Caddyfile parsing
- Update godocs / comments (especially provider name and nuances)
- Update README and remove this section

---

\<PROVIDER\> module for Caddy
===========================

This package contains a DNS provider module for [Caddy](https://github.com/caddyserver/caddy). It can be used to manage DNS records with \<PROVIDER\>.
This package contains a DNS provider module for [Caddy](https://github.com/caddyserver/caddy). It can be used to manage DNS records with Yandex Cloud accounts.

## Caddy module name

```
dns.providers.provider_name
dns.providers.yandex_cloud
```

## Config examples
Expand All @@ -26,30 +14,31 @@ To use this module for the ACME DNS challenge, [configure the ACME issuer in you

```json
{
"module": "acme",
"challenges": {
"dns": {
"provider": {
"name": "provider_name",
"api_token": "YOUR_PROVIDER_API_TOKEN"
}
}
}
"module": "acme",
"challenges": {
"dns": {
"provider": {
"name": "yandex_cloud",
"service_account_config_path": "YCLOUD_KEYS_FILE"
}
}
}
}
```

or with the Caddyfile:

```
# globally
{
acme_dns provider_name ...
your.domain.com {
respond "Hello World" # replace with whatever config you need...
tls {
dns yandex_cloud {env.YCLOUD_KEYS_FILE}
}
}
```

```
# one site
tls {
dns provider_name ...
}
```
You can replace `{env.YCLOUD_KEYS_FILE}` with the actual authorized keys file if you prefer to put it directly in your config instead of an environment variable.

## Authenticating

See [the associated README in the libdns package](https://github.com/github.com/profcomff/libdns-yandex-cloud) for important information about credentials.
45 changes: 41 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,8 +1,45 @@
module github.com/caddy-dns/template
module github.com/profcomff/caddy-dns-yandex-cloud

go 1.16
go 1.21.5

require (
github.com/caddyserver/caddy/v2 v2.4.1
github.com/libdns/template v0.1.0
github.com/caddyserver/caddy/v2 v2.7.6
github.com/profcomff/libdns-yandex-cloud v0.1.0
)

require (
github.com/beorn7/perks v1.0.1 // indirect
github.com/caddyserver/certmagic v0.20.0 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect
github.com/golang-jwt/jwt/v5 v5.2.0 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 // indirect
github.com/google/uuid v1.3.1 // indirect
github.com/klauspost/cpuid/v2 v2.2.5 // indirect
github.com/libdns/libdns v0.2.1 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
github.com/mholt/acmez v1.2.0 // indirect
github.com/miekg/dns v1.1.55 // indirect
github.com/onsi/ginkgo/v2 v2.9.5 // indirect
github.com/prometheus/client_golang v1.15.1 // indirect
github.com/prometheus/client_model v0.4.0 // indirect
github.com/prometheus/common v0.42.0 // indirect
github.com/prometheus/procfs v0.9.0 // indirect
github.com/quic-go/qpack v0.4.0 // indirect
github.com/quic-go/qtls-go1-20 v0.4.1 // indirect
github.com/quic-go/quic-go v0.40.0 // indirect
github.com/zeebo/blake3 v0.2.3 // indirect
go.uber.org/mock v0.3.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.25.0 // indirect
golang.org/x/crypto v0.14.0 // indirect
golang.org/x/exp v0.0.0-20230310171629-522b1b587ee0 // indirect
golang.org/x/mod v0.11.0 // indirect
golang.org/x/net v0.17.0 // indirect
golang.org/x/sys v0.14.0 // indirect
golang.org/x/term v0.13.0 // indirect
golang.org/x/text v0.13.0 // indirect
golang.org/x/tools v0.10.0 // indirect
google.golang.org/protobuf v1.31.0 // indirect
)
Loading

0 comments on commit ca0bb58

Please sign in to comment.