Files
105cf45897 Bug fix complex ns1 hostname (#10) (#11)
* Update issue templates

* remove bug template

* Create SECURITY.md

* docs - add medium article.

* bugFix - fix validation expression; regen manifests

* security: update version

* update to 1.0.3

* qa - new test scenario

* changelog - 1.0.3

---------

Co-authored-by: Nikolay Udovik <[email protected]>
2024-06-13 13:46:06 -05:00

1094 lines
41 KiB
YAML

---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.12.0
name: dnsconnectors.monkale.monkale.io
spec:
group: monkale.monkale.io
names:
kind: DNSConnector
listKind: DNSConnectorList
plural: dnsconnectors
singular: dnsconnector
scope: Namespaced
versions:
- additionalPrinterColumns:
- description: Last Change
jsonPath: .status.conditions[?(@.type=="Ready")].lastTransitionTime
name: Last Change
type: string
- description: The current state
jsonPath: .status.conditions[?(@.type=="Ready")].reason
name: State
type: string
- description: The current state
jsonPath: .status.conditions[?(@.type=="Ready")].message
name: Message
type: string
name: v1alpha1
schema:
openAPIV3Schema:
description: DNSConnector is the Schema for the dnsconnectors API
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: DNSConnectorSpec defines the desired state of DNSConnector
properties:
corednsCM:
description: corednsCM is the name of the CoreDNS ConfigMap.
properties:
corefileKey:
default: Corefile
description: corefileKey specifies the key whose value is the
Corefile. Typically, this key is "Corefile". The default value
is "Corefile"
type: string
name:
default: coredns
type: string
type: object
corednsDeployment:
description: corednsDeployment specifies the CoreDNS deployment type
and name or labels
properties:
name:
description: name specifies the name of the CoreDNS resource.
This field is optional if Type is Pod and a LabelSelector is
specified.
type: string
type:
description: type of the CoreDNS resource (e.g., Deployment, StatefulSet,
DaemonSet, ReplicaSet, Pod)
enum:
- Deployment
- StatefulSet
- DaemonSet
type: string
zonefilesMountDir:
default: /opt/coredns
description: zonefilesMountDir specifies the mountPath for zonefiles.
Default value is /opt/coredns.
pattern: ^(/[^/]+)+$
type: string
required:
- type
type: object
corednsZoneEnaledPlugins:
description: 'corednsZoneEnaledPlugins is list of enabled coredns
plugins. https://coredns.io/plugins. The most useful plugins are:
errors - prints errors to stdout; log - prints queries to stdout.'
items:
type: string
type: array
waitForUpdateTimeout:
default: 120
description: waitForUpdateTimeout specifies how long the DNSConnector
for coredns to complete update. if coredns deployment haven't complete
the update, the controller will perform rollback. The default value
is 120 seconds (2 min)
type: integer
required:
- corednsCM
- corednsDeployment
- waitForUpdateTimeout
type: object
status:
description: DNSConnectorStatus defines the observed state of DNSConnector
properties:
conditions:
description: conditions indidicate the status of a DNSZone.
items:
description: "Condition contains details for one aspect of the current
state of this API Resource. --- This struct is intended for direct
use as an array at the field path .status.conditions. For example,
\n type FooStatus struct{ // Represents the observations of a
foo's current state. // Known .status.conditions.type are: \"Available\",
\"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge
// +listType=map // +listMapKey=type Conditions []metav1.Condition
`json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\"
protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }"
properties:
lastTransitionTime:
description: lastTransitionTime is the last time the condition
transitioned from one status to another. This should be when
the underlying condition changed. If that is not known, then
using the time when the API field changed is acceptable.
format: date-time
type: string
message:
description: message is a human readable message indicating
details about the transition. This may be an empty string.
maxLength: 32768
type: string
observedGeneration:
description: observedGeneration represents the .metadata.generation
that the condition was set based upon. For instance, if .metadata.generation
is currently 12, but the .status.conditions[x].observedGeneration
is 9, the condition is out of date with respect to the current
state of the instance.
format: int64
minimum: 0
type: integer
reason:
description: reason contains a programmatic identifier indicating
the reason for the condition's last transition. Producers
of specific condition types may define expected values and
meanings for this field, and whether the values are considered
a guaranteed API. The value should be a CamelCase string.
This field may not be empty.
maxLength: 1024
minLength: 1
pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
type: string
status:
description: status of the condition, one of True, False, Unknown.
enum:
- "True"
- "False"
- Unknown
type: string
type:
description: type of condition in CamelCase or in foo.example.com/CamelCase.
--- Many .condition.type values are consistent across resources
like Available, but because arbitrary conditions can be useful
(see .node.status.conditions), the ability to deconflict is
important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)
maxLength: 316
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
type: string
required:
- lastTransitionTime
- message
- reason
- status
- type
type: object
type: array
x-kubernetes-list-map-keys:
- type
x-kubernetes-list-type: map
provisionedZones:
description: provisionedZones maps domain names to their serial numbers.
items:
description: ProvisionedDNSZone used to display the status of the
zones provisioned to the Coredns
properties:
domain:
type: string
name:
type: string
serialNumber:
type: string
required:
- domain
- name
- serialNumber
type: object
type: array
type: object
type: object
served: true
storage: true
subresources:
status: {}
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.12.0
name: dnsrecords.monkale.monkale.io
spec:
group: monkale.monkale.io
names:
kind: DNSRecord
listKind: DNSRecordList
plural: dnsrecords
singular: dnsrecord
scope: Namespaced
versions:
- additionalPrinterColumns:
- description: Record name
jsonPath: .spec.record.name
name: Record Name
type: string
- description: Record type
jsonPath: .spec.record.type
name: Record Type
type: string
- description: Record value
jsonPath: .spec.record.value
name: Record Value
type: string
- description: Reference to the zone
jsonPath: .spec.dnsZoneRef.name
name: Zone Reference
type: string
- description: Last Change
jsonPath: .status.conditions[?(@.type=='Ready')].lastTransitionTime
name: Last Change
type: string
- description: DNSRecord State
jsonPath: .status.conditions[?(@.type=='Ready')].reason
name: State
type: string
name: v1alpha1
schema:
openAPIV3Schema:
description: DNSRecord is the Schema for the dnsrecords API
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:
properties:
dnsZoneRef:
description: dnsZoneRef is a reference to a DNSZone instance to which
this record will publish its endpoints.
properties:
apiVersion:
description: API version of the referent.
type: string
fieldPath:
description: 'If referring to a piece of an object instead of
an entire object, this string should contain a valid JSON/Go
field access statement, such as desiredState.manifest.containers[2].
For example, if the object reference is to a container within
a pod, this would take on a value like: "spec.containers{name}"
(where "name" refers to the name of the container that triggered
the event) or if no container name is specified "spec.containers[2]"
(container with index 2 in this pod). This syntax is chosen
only to have some well-defined way of referencing a part of
an object. TODO: this design is not final and this field is
subject to change in the future.'
type: string
kind:
description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
name:
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
type: string
namespace:
description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
type: string
resourceVersion:
description: 'Specific resourceVersion to which this reference
is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency'
type: string
uid:
description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids'
type: string
type: object
x-kubernetes-map-type: atomic
record:
description: Record defines the desired DNS record.
properties:
name:
description: name specifes the record name.
type: string
ttl:
description: ttl is time to live, which tells how ling this record
can be cached. if not set, the default is minimumTTL value in
the SOA record.
type: string
type:
description: 'type is a record type according to RFC1035. Supported
types: A;AAAA;CNAME;MX;TXT;NS;PTR;SRV;CAA;DNSKEY;DS;NAPTR;RRSIG;DNAME;HINFO;'
enum:
- A
- AAAA
- CNAME
- MX
- TXT
- NS
- PTR
- SRV
- CAA
- DNSKEY
- DS
- NAPTR
- RRSIG
- DNAME
- HINFO
type: string
value:
description: value is a value of the record
type: string
required:
- name
- type
- value
type: object
required:
- dnsZoneRef
- record
type: object
status:
description: DNSRecordStatus defines the observed state of DNSRecord.
properties:
conditions:
description: conditions indidicate the status of a DNSRecord.
items:
description: "Condition contains details for one aspect of the current
state of this API Resource. --- This struct is intended for direct
use as an array at the field path .status.conditions. For example,
\n type FooStatus struct{ // Represents the observations of a
foo's current state. // Known .status.conditions.type are: \"Available\",
\"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge
// +listType=map // +listMapKey=type Conditions []metav1.Condition
`json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\"
protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }"
properties:
lastTransitionTime:
description: lastTransitionTime is the last time the condition
transitioned from one status to another. This should be when
the underlying condition changed. If that is not known, then
using the time when the API field changed is acceptable.
format: date-time
type: string
message:
description: message is a human readable message indicating
details about the transition. This may be an empty string.
maxLength: 32768
type: string
observedGeneration:
description: observedGeneration represents the .metadata.generation
that the condition was set based upon. For instance, if .metadata.generation
is currently 12, but the .status.conditions[x].observedGeneration
is 9, the condition is out of date with respect to the current
state of the instance.
format: int64
minimum: 0
type: integer
reason:
description: reason contains a programmatic identifier indicating
the reason for the condition's last transition. Producers
of specific condition types may define expected values and
meanings for this field, and whether the values are considered
a guaranteed API. The value should be a CamelCase string.
This field may not be empty.
maxLength: 1024
minLength: 1
pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
type: string
status:
description: status of the condition, one of True, False, Unknown.
enum:
- "True"
- "False"
- Unknown
type: string
type:
description: type of condition in CamelCase or in foo.example.com/CamelCase.
--- Many .condition.type values are consistent across resources
like Available, but because arbitrary conditions can be useful
(see .node.status.conditions), the ability to deconflict is
important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)
maxLength: 316
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
type: string
required:
- lastTransitionTime
- message
- reason
- status
- type
type: object
type: array
x-kubernetes-list-map-keys:
- type
x-kubernetes-list-type: map
generatedRecord:
description: generatedRecord displayes the generated dns record.
type: string
validationPassed:
description: validationPassed displays whether the record passed syntax
validation check
type: boolean
type: object
type: object
served: true
storage: true
subresources:
status: {}
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.12.0
name: dnszones.monkale.monkale.io
spec:
group: monkale.monkale.io
names:
kind: DNSZone
listKind: DNSZoneList
plural: dnszones
singular: dnszone
scope: Namespaced
versions:
- additionalPrinterColumns:
- description: Domain name
jsonPath: .spec.domain
name: Domain Name
type: string
- description: Record Count. Without SOA and First NS
jsonPath: .status.recordCount
name: Record Count
type: integer
- description: Last Change
jsonPath: .status.conditions[?(@.type=="Ready")].lastTransitionTime
name: Last Change
type: string
- description: Represents the current version of the zonefile
jsonPath: .status.currentZoneSerial
name: Current Serial
type: string
- description: DNSZone state
jsonPath: .status.conditions[?(@.type=="Ready")].reason
name: State
type: string
name: v1alpha1
schema:
openAPIV3Schema:
description: DNSZone is the Schema for the dnszones API
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: DNSZoneSpec defines the desired state of DNSZone. DNSZoneSpec
creates the new zone file with the SOA record. DNSZoneSpec creates DNSRecords
of type NS.
properties:
cmPrefix:
default: coredns-zone-
description: cmPrefix specifies the prefix for the zone file configmap.
The default value is coredns-zone-. The CM Name format is "prefix"
+ "metadata.name",
pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(-)?$
type: string
connectorName:
description: connectorName is the pointer to the DNSConnector Resource.
Must contain the name of the DNSConnector Resource.
type: string
domain:
description: domain specifies domain in which DNSRecors are valid.
type: string
expireTime:
default: 1209600
description: expireTime defines how long the secondary server should
wait before discarding the zone data if it cannot reach the primary
server. The default value is 1209600 seconds (2 weeks)
type: integer
minimumTTL:
default: 86400
description: minimumTTL is the minimum amount of time that should
be allowed for caching the DNS records. If individual records do
not specify a TTL, this value should be used. The default value
is 86400 seconds (24 hours)
type: integer
primaryNS:
description: primaryNS defines NS record for the zone, and its A/AAAA
record.
properties:
hostname:
default: ns1
description: hostname is the server name of the primary name server
for this zone. The default value is "ns1".
maxLength: 253
minLength: 1
pattern: ^[a-zA-Z0-9]([-a-zA-Z0-9]*[a-zA-Z0-9])?(\.[a-zA-Z0-9]([-a-zA-Z0-9]*[a-zA-Z0-9])?)*$
type: string
ipAddress:
description: ipAddress defines IP address to the dns server where
the zone hosted. If the zone is managed by k8s coredns specify
IP of kubernetes lb/node. Provide either ipv4, or ipv6.
type: string
recordType:
default: A
description: recordType defines the type of the record to be created
for the NS's A record. In case of ipv6 set it to "AAAA". The
default value is "A".
enum:
- A
- AAAA
type: string
required:
- ipAddress
- recordType
type: object
refreshRate:
default: 7200
description: refreshRate defines the time a secondary DNS server waits
before querying the primary DNS server to check for updates. If
the zone file has changed, secondary servers will refresh their
data. these records should be cached by DNS resolvers. The default
value is 7200 seconds (2 hours)
type: integer
respPersonEmail:
description: respPersonEmail is responsible party's email for the
domain. Typically formatted as [email protected] but represented
with a dot (.) instead of an at (@) in DNS records. The first dot
separates the user name from the domain.
pattern: ^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,6}$
type: string
retryInterval:
default: 3600
description: retryInterval defines how long secondary server failed
should wait before trying again to reconnect to the primary again.
The default value is 3600 seconds (1 hour)
type: integer
ttl:
default: 86400
description: ttl specified default Time to Lieve for the zone's records,
indicates how long these records should be cached by DNS resolvers.
The default value is 86400 seconds (24 hours)
type: integer
required:
- domain
- primaryNS
- respPersonEmail
type: object
status:
description: DNSZoneStatus defines the observed state of DNSZone
properties:
checkpoint:
description: checkpoint flag indicates whether the DNSZone was previously
active. This flag is used to instruct the DNSConnector to preserve
the old version of the DNSZone in case the update process encounters
an issue.
type: boolean
conditions:
description: conditions indidicate the status of a DNSZone.
items:
description: "Condition contains details for one aspect of the current
state of this API Resource. --- This struct is intended for direct
use as an array at the field path .status.conditions. For example,
\n type FooStatus struct{ // Represents the observations of a
foo's current state. // Known .status.conditions.type are: \"Available\",
\"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge
// +listType=map // +listMapKey=type Conditions []metav1.Condition
`json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\"
protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }"
properties:
lastTransitionTime:
description: lastTransitionTime is the last time the condition
transitioned from one status to another. This should be when
the underlying condition changed. If that is not known, then
using the time when the API field changed is acceptable.
format: date-time
type: string
message:
description: message is a human readable message indicating
details about the transition. This may be an empty string.
maxLength: 32768
type: string
observedGeneration:
description: observedGeneration represents the .metadata.generation
that the condition was set based upon. For instance, if .metadata.generation
is currently 12, but the .status.conditions[x].observedGeneration
is 9, the condition is out of date with respect to the current
state of the instance.
format: int64
minimum: 0
type: integer
reason:
description: reason contains a programmatic identifier indicating
the reason for the condition's last transition. Producers
of specific condition types may define expected values and
meanings for this field, and whether the values are considered
a guaranteed API. The value should be a CamelCase string.
This field may not be empty.
maxLength: 1024
minLength: 1
pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
type: string
status:
description: status of the condition, one of True, False, Unknown.
enum:
- "True"
- "False"
- Unknown
type: string
type:
description: type of condition in CamelCase or in foo.example.com/CamelCase.
--- Many .condition.type values are consistent across resources
like Available, but because arbitrary conditions can be useful
(see .node.status.conditions), the ability to deconflict is
important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)
maxLength: 316
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
type: string
required:
- lastTransitionTime
- message
- reason
- status
- type
type: object
type: array
x-kubernetes-list-map-keys:
- type
x-kubernetes-list-type: map
currentZoneSerial:
default: "000000001"
description: currentZoneSerial is a version number that changes update
of the zone file, signaling to secondary DNS servers when they should
synchronize their data. In our reality we use it to represent the
zone file version. Zone Serial implemented as time now formatted
to MMDDHHMMSS. Zone Serial represents the current version of the
zone file.
type: string
recordCount:
default: 0
description: recordCount is the number of records in the zone. Does
not include SOA and NS.
type: integer
validationPassed:
description: validationPassed displays whether the zonefile passed
syntax validation check
type: boolean
zoneConfigmap:
description: zoneConfigmap displays the name of the generated zone
config map
type: string
type: object
type: object
served: true
storage: true
subresources:
status: {}
---
apiVersion: v1
kind: ServiceAccount
metadata:
labels:
app.kubernetes.io/component: rbac
app.kubernetes.io/created-by: coredns-manager-operator
app.kubernetes.io/instance: controller-manager-sa
app.kubernetes.io/managed-by: kustomize
app.kubernetes.io/name: serviceaccount
app.kubernetes.io/part-of: coredns-manager-operator
name: coredns-manager-operator-controller-manager
namespace: kube-system
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
labels:
app.kubernetes.io/component: rbac
app.kubernetes.io/created-by: coredns-manager-operator
app.kubernetes.io/instance: leader-election-role
app.kubernetes.io/managed-by: kustomize
app.kubernetes.io/name: role
app.kubernetes.io/part-of: coredns-manager-operator
name: coredns-manager-operator-leader-election-role
namespace: kube-system
rules:
- apiGroups:
- ""
resources:
- configmaps
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- coordination.k8s.io
resources:
- leases
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- ""
resources:
- events
verbs:
- create
- patch
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: coredns-manager-operator-manager-role
rules:
- apiGroups:
- ""
resources:
- configmaps
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- apps
resources:
- daemonsets
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- apps
resources:
- deployments
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- apps
resources:
- statefulsets
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- monkale.monkale.io
resources:
- dnsconnectors
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- monkale.monkale.io
resources:
- dnsconnectors/finalizers
verbs:
- update
- apiGroups:
- monkale.monkale.io
resources:
- dnsconnectors/status
verbs:
- get
- patch
- update
- apiGroups:
- monkale.monkale.io
resources:
- dnsrecords
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- monkale.monkale.io
resources:
- dnsrecords/finalizers
verbs:
- update
- apiGroups:
- monkale.monkale.io
resources:
- dnsrecords/status
verbs:
- get
- patch
- update
- apiGroups:
- monkale.monkale.io
resources:
- dnszones
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- monkale.monkale.io
resources:
- dnszones/finalizers
verbs:
- update
- apiGroups:
- monkale.monkale.io
resources:
- dnszones/status
verbs:
- get
- patch
- update
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
labels:
app.kubernetes.io/component: kube-rbac-proxy
app.kubernetes.io/created-by: coredns-manager-operator
app.kubernetes.io/instance: metrics-reader
app.kubernetes.io/managed-by: kustomize
app.kubernetes.io/name: clusterrole
app.kubernetes.io/part-of: coredns-manager-operator
name: coredns-manager-operator-metrics-reader
rules:
- nonResourceURLs:
- /metrics
verbs:
- get
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
labels:
app.kubernetes.io/component: kube-rbac-proxy
app.kubernetes.io/created-by: coredns-manager-operator
app.kubernetes.io/instance: proxy-role
app.kubernetes.io/managed-by: kustomize
app.kubernetes.io/name: clusterrole
app.kubernetes.io/part-of: coredns-manager-operator
name: coredns-manager-operator-proxy-role
rules:
- apiGroups:
- authentication.k8s.io
resources:
- tokenreviews
verbs:
- create
- apiGroups:
- authorization.k8s.io
resources:
- subjectaccessreviews
verbs:
- create
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
labels:
app.kubernetes.io/component: rbac
app.kubernetes.io/created-by: coredns-manager-operator
app.kubernetes.io/instance: leader-election-rolebinding
app.kubernetes.io/managed-by: kustomize
app.kubernetes.io/name: rolebinding
app.kubernetes.io/part-of: coredns-manager-operator
name: coredns-manager-operator-leader-election-rolebinding
namespace: kube-system
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: coredns-manager-operator-leader-election-role
subjects:
- kind: ServiceAccount
name: coredns-manager-operator-controller-manager
namespace: kube-system
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
labels:
app.kubernetes.io/component: rbac
app.kubernetes.io/created-by: coredns-manager-operator
app.kubernetes.io/instance: manager-rolebinding
app.kubernetes.io/managed-by: kustomize
app.kubernetes.io/name: clusterrolebinding
app.kubernetes.io/part-of: coredns-manager-operator
name: coredns-manager-operator-manager-rolebinding
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: coredns-manager-operator-manager-role
subjects:
- kind: ServiceAccount
name: coredns-manager-operator-controller-manager
namespace: kube-system
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
labels:
app.kubernetes.io/component: kube-rbac-proxy
app.kubernetes.io/created-by: coredns-manager-operator
app.kubernetes.io/instance: proxy-rolebinding
app.kubernetes.io/managed-by: kustomize
app.kubernetes.io/name: clusterrolebinding
app.kubernetes.io/part-of: coredns-manager-operator
name: coredns-manager-operator-proxy-rolebinding
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: coredns-manager-operator-proxy-role
subjects:
- kind: ServiceAccount
name: coredns-manager-operator-controller-manager
namespace: kube-system
---
apiVersion: v1
kind: Service
metadata:
labels:
app.kubernetes.io/component: kube-rbac-proxy
app.kubernetes.io/created-by: coredns-manager-operator
app.kubernetes.io/instance: controller-manager-metrics-service
app.kubernetes.io/managed-by: kustomize
app.kubernetes.io/name: service
app.kubernetes.io/part-of: coredns-manager-operator
control-plane: controller-manager
name: coredns-manager-operator-controller-manager-metrics-service
namespace: kube-system
spec:
ports:
- name: https
port: 8443
protocol: TCP
targetPort: https
selector:
control-plane: controller-manager
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app.kubernetes.io/component: manager
app.kubernetes.io/created-by: coredns-manager-operator
app.kubernetes.io/instance: controller-manager
app.kubernetes.io/managed-by: kustomize
app.kubernetes.io/name: deployment
app.kubernetes.io/part-of: coredns-manager-operator
control-plane: controller-manager
name: coredns-manager-operator-controller-manager
namespace: kube-system
spec:
replicas: 1
selector:
matchLabels:
control-plane: controller-manager
template:
metadata:
annotations:
kubectl.kubernetes.io/default-container: manager
labels:
control-plane: controller-manager
spec:
containers:
- args:
- --secure-listen-address=0.0.0.0:8443
- --upstream=http://127.0.0.1:8080/
- --logtostderr=true
- --v=0
image: gcr.io/kubebuilder/kube-rbac-proxy:v0.14.1
name: kube-rbac-proxy
ports:
- containerPort: 8443
name: https
protocol: TCP
resources:
limits:
cpu: 500m
memory: 128Mi
requests:
cpu: 5m
memory: 64Mi
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
- args:
- --health-probe-bind-address=:8081
- --metrics-bind-address=127.0.0.1:8080
- --leader-elect
command:
- /manager
image: docker.io/monkale/coredns-manager-operator:v1.0.3
livenessProbe:
httpGet:
path: /healthz
port: 8081
initialDelaySeconds: 15
periodSeconds: 20
name: manager
readinessProbe:
httpGet:
path: /readyz
port: 8081
initialDelaySeconds: 5
periodSeconds: 10
resources:
limits:
cpu: 500m
memory: 128Mi
requests:
cpu: 10m
memory: 64Mi
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
securityContext:
runAsNonRoot: true
serviceAccountName: coredns-manager-operator-controller-manager
terminationGracePeriodSeconds: 10