Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion modules/envoy-gateway/blueprint.cue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
version: "1.0"
project: {
name: "envoy-gateway"
name: "external-dns"
release: {
kcl: {
on: tag: {}
Expand Down
35 changes: 35 additions & 0 deletions modules/external-dns/Earthfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
VERSION 0.8

IMPORT ../../earthly/kcl AS kcl

deps:
FROM debian:bookworm-slim

RUN apt-get update && apt-get install -y curl wget

DO kcl+INSTALL

src:
FROM +deps

WORKDIR /work

COPY --dir crd v1alpha1 .
COPY kcl.mod kcl.mod.lock README.md .

generate:
FROM +src

RUN kcl import -m crd -o . -s crd/crd.yaml
RUN kcl doc generate

SAVE ARTIFACT models/v1alpha1 AS LOCAL v1alpha1
SAVE ARTIFACT docs/external-dns.md AS LOCAL README.md

check:
FROM +generate

WORKDIR /work

RUN diff -r models/v1alpha1 v1alpha1
RUN diff -r docs/external-dns.md README.md
194 changes: 194 additions & 0 deletions modules/external-dns/README.md

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions modules/external-dns/blueprint.cue
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
version: "1.0"
project: {
name: "envoy-gateway"
release: {
kcl: {
on: tag: {}
}
}
}
102 changes: 102 additions & 0 deletions modules/external-dns/crd/crd.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: dnsendpoints.externaldns.k8s.io
annotations:
api-approved.kubernetes.io: https://github.com/kubernetes-sigs/external-dns/pull/2007
spec:
group: externaldns.k8s.io
names:
kind: DNSEndpoint
listKind: DNSEndpointList
plural: dnsendpoints
singular: dnsendpoint
scope: Namespaced
versions:
- name: v1alpha1
schema:
openAPIV3Schema:
properties:
apiVersion:
description: |-
APIVersion defines the versioned schema of this representation of an object.
Servers should convert recognized schemas to the latest internal value, and
may reject unrecognized values.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
type: string
kind:
description: |-
Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to.
Cannot be updated.
In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
type: string
metadata:
type: object
spec:
description: DNSEndpointSpec defines the desired state of DNSEndpoint
properties:
endpoints:
items:
description:
Endpoint is a high-level way of a connection between
a service and an IP
properties:
dnsName:
description: The hostname of the DNS record
type: string
labels:
additionalProperties:
type: string
description: Labels stores labels defined for the Endpoint
type: object
providerSpecific:
description: ProviderSpecific stores provider specific config
items:
description:
ProviderSpecificProperty holds the name and value
of a configuration which is specific to individual DNS providers
properties:
name:
type: string
value:
type: string
type: object
type: array
recordTTL:
description: TTL for the record
format: int64
type: integer
recordType:
description:
RecordType type of record, e.g. CNAME, A, AAAA,
SRV, TXT etc
type: string
setIdentifier:
description:
Identifier to distinguish multiple records with
the same name and type (e.g. Route53 records with routing
policies other than 'simple')
type: string
targets:
description: The targets the DNS record points to
items:
type: string
type: array
type: object
type: array
type: object
status:
description: DNSEndpointStatus defines the observed state of DNSEndpoint
properties:
observedGeneration:
description: The generation observed by the external-dns controller.
format: int64
type: integer
type: object
type: object
served: true
storage: true
subresources:
status: {}
7 changes: 7 additions & 0 deletions modules/external-dns/kcl.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[package]
name = "external-dns"
edition = "v0.11.1"
version = "0.16.1"

[dependencies]
k8s = "1.31.2"
9 changes: 9 additions & 0 deletions modules/external-dns/kcl.mod.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[dependencies]
[dependencies.k8s]
name = "k8s"
full_name = "k8s_1.31.2"
version = "1.31.2"
sum = "xBZgPsnpVVyWBpahuPQHReeRx28eUHGFoaPeqbct+vs="
reg = "ghcr.io"
repo = "kcl-lang/k8s"
oci_tag = "1.31.2"
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
"""
This file was generated by the KCL auto-gen tool. DO NOT EDIT.
Editing this file might prove futile when you re-run the KCL auto-gen generate command.
"""
import k8s.apimachinery.pkg.apis.meta.v1


schema DNSEndpoint:
r"""
externaldns k8s io v1alpha1 DNS endpoint

Attributes
----------
apiVersion : str, default is "externaldns.k8s.io/v1alpha1", required
APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
kind : str, default is "DNSEndpoint", required
Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
metadata : v1.ObjectMeta, default is Undefined, optional
metadata
spec : ExternaldnsK8sIoV1alpha1DNSEndpointSpec, default is Undefined, optional
spec
status : ExternaldnsK8sIoV1alpha1DNSEndpointStatus, default is Undefined, optional
status
"""


apiVersion: "externaldns.k8s.io/v1alpha1" = "externaldns.k8s.io/v1alpha1"

kind: "DNSEndpoint" = "DNSEndpoint"

metadata?: v1.ObjectMeta

spec?: ExternaldnsK8sIoV1alpha1DNSEndpointSpec

status?: ExternaldnsK8sIoV1alpha1DNSEndpointStatus


schema ExternaldnsK8sIoV1alpha1DNSEndpointSpec:
r"""
DNSEndpointSpec defines the desired state of DNSEndpoint

Attributes
----------
endpoints : [ExternaldnsK8sIoV1alpha1DNSEndpointSpecEndpointsItems0], default is Undefined, optional
endpoints
"""


endpoints?: [ExternaldnsK8sIoV1alpha1DNSEndpointSpecEndpointsItems0]


schema ExternaldnsK8sIoV1alpha1DNSEndpointSpecEndpointsItems0:
r"""
Endpoint is a high-level way of a connection between a service and an IP

Attributes
----------
dnsName : str, default is Undefined, optional
The hostname of the DNS record
labels : {str:str}, default is Undefined, optional
Labels stores labels defined for the Endpoint
providerSpecific : [ExternaldnsK8sIoV1alpha1DNSEndpointSpecEndpointsItems0ProviderSpecificItems0], default is Undefined, optional
ProviderSpecific stores provider specific config
recordTTL : int, default is Undefined, optional
TTL for the record
recordType : str, default is Undefined, optional
RecordType type of record, e.g. CNAME, A, AAAA, SRV, TXT etc
setIdentifier : str, default is Undefined, optional
Identifier to distinguish multiple records with the same name and type (e.g. Route53 records with routing policies other than 'simple')
targets : [str], default is Undefined, optional
The targets the DNS record points to
"""


dnsName?: str

labels?: {str:str}

providerSpecific?: [ExternaldnsK8sIoV1alpha1DNSEndpointSpecEndpointsItems0ProviderSpecificItems0]

recordTTL?: int

recordType?: str

setIdentifier?: str

targets?: [str]


schema ExternaldnsK8sIoV1alpha1DNSEndpointSpecEndpointsItems0ProviderSpecificItems0:
r"""
ProviderSpecificProperty holds the name and value of a configuration which is specific to individual DNS providers

Attributes
----------
name : str, default is Undefined, optional
name
value : str, default is Undefined, optional
value
"""


name?: str

value?: str


schema ExternaldnsK8sIoV1alpha1DNSEndpointStatus:
r"""
DNSEndpointStatus defines the observed state of DNSEndpoint

Attributes
----------
observedGeneration : int, default is Undefined, optional
The generation observed by the external-dns controller.
"""


observedGeneration?: int