dev-cluster-dns

command module
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 18, 2024 License: GPL-3.0 Imports: 1 Imported by: 0

README

dev-cluster-dns

Usage

Creates and deletes DNS records for an OpenShift cluster in AWS route 53. Specifically it creates:

  • api.<cluster name>.<hosted zone>
  • *.apps.<cluster name>.<hosted zone>

By default it uses zone Z0400818H9HMCRQLQP0V, which is shiftstack-dev.devcluster.openshift.com. This can be overridden with the --hosted-zone option.

Create records
$ dev-cluster-dns create my-cluster --api 192.0.2.1 --ingress 192.0.2.2
2024/06/11 14:24:20 Base domain: shiftstack-dev.devcluster.openshift.com.
2024/06/11 14:24:20 Create or update records: api.my-cluster.shiftstack-dev.devcluster.openshift.com. *.apps.my-cluster.shiftstack-dev.devcluster.openshift.com.
2024/06/11 14:24:20 Status: PENDING

Note that the base domain of the hosted cluster is added automatically.

Note that the status is PENDING, meaning that the records are not published yet. Use the --wait flag if you need to wait until the records are published. A recommended value is 120 seconds.

The default TTL for the records is 60 seconds. It can be changed with the --ttl flag.

create will also update existing records.

List records
$ dev-cluster-dns list
name: api.my-cluster.shiftstack-dev.devcluster.openshift.com.
        value: 192.0.2.1
name: *.apps.my-cluster.shiftstack-dev.devcluster.openshift.com.
        value: 192.0.2.2
Delete records
$ dev-cluster-dns delete my-cluster
2024/06/11 14:28:00 Deleted: api.my-cluster.shiftstack-dev.devcluster.openshift.com. \052.apps.my-cluster.shiftstack-dev.devcluster.openshift.com.

Building

This repo is configured to automatically generate a release whenever a tag is pushed. To create a new release, simply push a new tag.

Documentation

Overview

Copyright © 2024 Matthew Booth

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL