DNSPolicy
Property | Value |
---|---|
Google Cloud Service Name | Cloud DNS |
Google Cloud Service Documentation | /dns/docs/ |
Google Cloud REST Resource Name | v1beta2.policy |
Google Cloud REST Resource Documentation | /dns/docs/reference/rest/v1beta2/policies |
Config Connector Resource Short Names | gcpdnspolicy gcpdnspolicies dnspolicy |
Config Connector Service Name | dns.googleapis.com |
Config Connector Resource Fully Qualified Name | dnspolicies.dns.cnrm.cloud.google.com |
Can Be Referenced by IAMPolicy/IAMPolicyMember | No |
Config Connector Default Average Reconcile Interval In Seconds | 600 |
Custom Resource Definition Properties
Annotations
Fields | |
---|---|
cnrm.cloud.google.com/project-id |
Spec
Schema
alternativeNameServerConfig:
targetNameServers:
- forwardingPath: string
ipv4Address: string
description: string
enableInboundForwarding: boolean
enableLogging: boolean
networks:
- networkRef:
external: string
name: string
namespace: string
resourceID: string
Fields | |
---|---|
Optional |
Sets an alternative name server for the associated networks. When specified, all DNS queries are forwarded to a name server that you choose. Names such as .internal are not available when an alternative name server is specified. |
Required* |
Sets an alternative name server for the associated networks. When specified, all DNS queries are forwarded to a name server that you choose. Names such as .internal are not available when an alternative name server is specified. |
Required* |
|
Optional |
Forwarding path for this TargetNameServer. If unset or 'default' Cloud DNS will make forwarding decision based on address ranges, i.e. RFC1918 addresses go to the VPC, Non-RFC1918 addresses go to the Internet. When set to 'private', Cloud DNS will always send queries through VPC for this target Possible values: ["default", "private"]. |
Required* |
IPv4 address to forward to. |
Optional |
A textual description field. Defaults to 'Managed by Config Connector'. |
Optional |
Allows networks bound to this policy to receive DNS queries sent by VMs or applications over VPN connections. When enabled, a virtual IP address will be allocated from each of the sub-networks that are bound to this policy. |
Optional |
Controls whether logging is enabled for the networks bound to this policy. Defaults to no logging if not set. |
Optional |
List of network names specifying networks to which this policy is applied. |
Optional |
|
Required* |
VPC network to bind to. |
Optional |
Allowed value: The `selfLink` field of a `ComputeNetwork` resource. |
Optional |
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names |
Optional |
Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ |
Optional |
Immutable. Optional. The name of the resource. Used for creation and acquisition. When unset, the value of `metadata.name` is used as the default. |
* Field is required when parent field is specified
Status
Schema
conditions:
- lastTransitionTime: string
message: string
reason: string
status: string
type: string
observedGeneration: integer
Fields | |
---|---|
conditions |
Conditions represent the latest available observation of the resource's current state. |
conditions[] |
|
conditions[].lastTransitionTime |
Last time the condition transitioned from one status to another. |
conditions[].message |
Human-readable message indicating details about last transition. |
conditions[].reason |
Unique, one-word, CamelCase reason for the condition's last transition. |
conditions[].status |
Status is the status of the condition. Can be True, False, Unknown. |
conditions[].type |
Type is the type of the condition. |
observedGeneration |
ObservedGeneration is the generation of the resource that was most recently observed by the Config Connector controller. If this is equal to metadata.generation, then that means that the current reported status reflects the most recent desired state of the resource. |
Sample YAML(s)
Typical Use Case
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
apiVersion: dns.cnrm.cloud.google.com/v1beta1
kind: DNSPolicy
metadata:
name: dnspolicy-sample
spec:
alternativeNameServerConfig:
targetNameServers:
- ipv4Address: "104.132.166.92"
description: "Example DNS policy"
enableInboundForwarding: true
enableLogging: true
networks:
- networkRef:
name: dnspolicy-dep
---
apiVersion: compute.cnrm.cloud.google.com/v1beta1
kind: ComputeNetwork
metadata:
name: dnspolicy-dep
spec:
autoCreateSubnetworks: false