Skip to content
Closed
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions data/data/aws/cluster/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,11 @@ module "dns" {
cluster_id = var.cluster_id
tags = local.tags
internal_zone = var.aws_internal_zone
internal_zone_role = var.aws_internal_zone_role
vpc_id = module.vpc.vpc_id
region = var.aws_region
publish_strategy = var.aws_publish_strategy
custom_endpoints = var.custom_endpoints
}

module "vpc" {
Expand Down
35 changes: 31 additions & 4 deletions data/data/aws/cluster/route53/base.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,27 @@ locals {
use_alias = ! local.use_cname
}

provider "aws" {
alias = "private_hosted_zone"

assume_role {
role_arn = var.internal_zone_role
}

region = var.region

skip_region_validation = true

endpoints {
ec2 = lookup(var.custom_endpoints, "ec2", null)
elb = lookup(var.custom_endpoints, "elasticloadbalancing", null)
iam = lookup(var.custom_endpoints, "iam", null)
route53 = lookup(var.custom_endpoints, "route53", null)
s3 = lookup(var.custom_endpoints, "s3", null)
sts = lookup(var.custom_endpoints, "sts", null)
}
}

data "aws_route53_zone" "public" {
count = local.public_endpoints ? 1 : 0

Expand All @@ -18,6 +39,8 @@ data "aws_route53_zone" "public" {
}

data "aws_route53_zone" "int" {
provider = aws.private_hosted_zone

zone_id = var.internal_zone == null ? aws_route53_zone.new_int[0].id : var.internal_zone
}

Expand Down Expand Up @@ -54,7 +77,8 @@ resource "aws_route53_record" "api_external_alias" {
}

resource "aws_route53_record" "api_internal_alias" {
count = local.use_alias ? 1 : 0
provider = aws.private_hosted_zone
count = local.use_alias ? 1 : 0

zone_id = data.aws_route53_zone.int.zone_id
name = "api-int.${var.cluster_domain}"
Expand All @@ -68,7 +92,8 @@ resource "aws_route53_record" "api_internal_alias" {
}

resource "aws_route53_record" "api_external_internal_zone_alias" {
count = local.use_alias ? 1 : 0
provider = aws.private_hosted_zone
count = local.use_alias ? 1 : 0

zone_id = data.aws_route53_zone.int.zone_id
name = "api.${var.cluster_domain}"
Expand All @@ -93,7 +118,8 @@ resource "aws_route53_record" "api_external_cname" {
}

resource "aws_route53_record" "api_internal_cname" {
count = local.use_cname ? 1 : 0
provider = aws.private_hosted_zone
count = local.use_cname ? 1 : 0

zone_id = data.aws_route53_zone.int.zone_id
name = "api-int.${var.cluster_domain}"
Expand All @@ -104,7 +130,8 @@ resource "aws_route53_record" "api_internal_cname" {
}

resource "aws_route53_record" "api_external_internal_zone_cname" {
count = local.use_cname ? 1 : 0
provider = aws.private_hosted_zone
count = local.use_cname ? 1 : 0

zone_id = data.aws_route53_zone.int.zone_id
name = "api.${var.cluster_domain}"
Expand Down
19 changes: 19 additions & 0 deletions data/data/aws/cluster/route53/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ variable "internal_zone" {
description = "An existing hosted zone (zone ID) to use for the internal API."
}

variable "internal_zone_role" {
type = string
default = null
description = "(optional) A role to assume when using an existing hosted zone from another account."
}

variable "api_external_lb_dns_name" {
description = "External API's LB DNS name"
type = string
Expand Down Expand Up @@ -63,3 +69,16 @@ variable "region" {
type = string
description = "The target AWS region for the cluster."
}

variable "custom_endpoints" {
type = map(string)

description = <<EOF
(optional) Custom AWS endpoints to override existing services.
Check - https://www.terraform.io/docs/providers/aws/guides/custom-service-endpoints.html

Example: `{ "key" = "value", "foo" = "bar" }`
EOF

default = {}
}
7 changes: 7 additions & 0 deletions data/data/aws/variables-aws.tf
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,13 @@ variable "aws_internal_zone" {
description = "(optional) An existing hosted zone (zone ID) to use for the internal API."
}

variable "aws_internal_zone_role" {
type = string
default = null
description = "(optional) A role to assume when using an existing hosted zone from another account."
}


variable "aws_publish_strategy" {
type = string
description = "The cluster publishing strategy, either Internal or External"
Expand Down
10 changes: 10 additions & 0 deletions data/data/install.openshift.io_installconfigs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ spec:
- Storage
- CSISnapshot
- NodeTuning
- MachineAPI
type: string
type: array
baselineCapabilitySet:
Expand All @@ -86,6 +87,7 @@ spec:
- v4.11
- v4.12
- v4.13
- v4.14
- vCurrent
type: string
type: object
Expand Down Expand Up @@ -2265,6 +2267,14 @@ spec:
the subnets. Leave the hosted zone unset to have the installer
create the hosted zone on your behalf.
type: string
hostedZoneRole:
description: HostedZoneRole is the ARN of a role to be assumed
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would be specific of the name of the AWS service

Suggested change
description: HostedZoneRole is the ARN of a role to be assumed
description: HostedZoneRole is the ARN of an IAM role to be assumed

when performing operations on the provided HostedZone. HostedZoneRole
can be used in a shared VPC scenario when the private hosted
zone belongs to a different account than the rest of the cluster
resources. If HostedZoneRole is set, HostedZone must also be
set.
type: string
lbType:
description: "LBType is an optional field to specify a load balancer
type. \n When this field is specified, the default ingresscontroller
Expand Down
2 changes: 1 addition & 1 deletion docs/dev/dependencies.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ We follow a hard flattening approach; i.e. direct and inherited dependencies are

Dependencies are managed with [Go Modules](https://github.com/golang/go/wiki/Modules) but committed directly to the repository.

We require at least Go 1.18.
We require at least Go 1.20.

- Add or update a dependency with `go get <dependency>@<version>`.
- If you want to use a fork of a project or ensure that a dependency is not updated even when another dependency requires a newer version of it, manually add a [replace directive in the go.mod file](https://github.com/golang/go/wiki/Modules#when-should-i-use-the-replace-directive).
Expand Down
75 changes: 36 additions & 39 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/openshift/installer

go 1.18
go 1.20

require (
cloud.google.com/go/monitoring v1.12.0
Expand Down Expand Up @@ -38,7 +38,7 @@ require (
github.com/go-playground/validator/v10 v10.2.0
github.com/golang-jwt/jwt v3.2.2+incompatible
github.com/golang/mock v1.7.0-rc.1
github.com/golang/protobuf v1.5.2
github.com/golang/protobuf v1.5.3
github.com/google/go-cmp v0.5.9
github.com/google/uuid v1.3.0
github.com/gophercloud/gophercloud v1.3.0
Expand All @@ -49,14 +49,13 @@ require (
github.com/jongio/azidext/go/azidext v0.4.0
github.com/kdomanski/iso9660 v0.2.1
github.com/libvirt/libvirt-go v5.10.0+incompatible
github.com/metal3-io/baremetal-operator v0.0.0-20220128094204-28771f489634
github.com/metal3-io/baremetal-operator/apis v0.0.0
github.com/metal3-io/baremetal-operator/pkg/hardwareutils v0.0.0
github.com/metal3-io/baremetal-operator/apis v0.2.0
github.com/metal3-io/baremetal-operator/pkg/hardwareutils v0.2.0
github.com/microsoft/kiota-authentication-azure-go v0.5.0
github.com/microsoftgraph/msgraph-sdk-go v0.47.0
github.com/nutanix-cloud-native/prism-go-client v0.2.1-0.20220804130801-c8a253627c64
github.com/onsi/gomega v1.26.0
github.com/openshift/api v0.0.0-20230201213816-61d971884921
github.com/onsi/gomega v1.27.7
github.com/openshift/api v0.0.0-20230531161518-2346bf94f19e
github.com/openshift/assisted-image-service v0.0.0-20220506122314-2f689a1084b8
github.com/openshift/assisted-service v0.0.0-20220928142635-a40422bdea61
github.com/openshift/assisted-service/api v0.0.0
Expand All @@ -76,9 +75,9 @@ require (
github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e
github.com/pkg/errors v0.9.1
github.com/pkg/sftp v1.10.1
github.com/prometheus/client_golang v1.14.0
github.com/prometheus/common v0.39.0
github.com/rogpeppe/go-internal v1.9.0
github.com/prometheus/client_golang v1.15.1
github.com/prometheus/common v0.42.0
github.com/rogpeppe/go-internal v1.10.0
github.com/shurcooL/vfsgen v0.0.0-20181202132449-6a9ea43bcacd
github.com/sirupsen/logrus v1.9.0
github.com/spf13/cobra v1.6.0
Expand All @@ -88,22 +87,22 @@ require (
github.com/vincent-petithory/dataurl v1.0.0
github.com/vmware/govmomi v0.27.4
golang.org/x/crypto v0.1.0
golang.org/x/oauth2 v0.4.0
golang.org/x/sys v0.6.0
golang.org/x/term v0.4.0
golang.org/x/oauth2 v0.5.0
golang.org/x/sys v0.8.0
golang.org/x/term v0.8.0
google.golang.org/api v0.107.0
google.golang.org/genproto v0.0.0-20230112194545-e10362b5ecf9
google.golang.org/grpc v1.51.0
gopkg.in/ini.v1 v1.66.6
gopkg.in/yaml.v2 v2.4.0
k8s.io/api v0.26.1
k8s.io/apiextensions-apiserver v0.25.2
k8s.io/apimachinery v0.26.1
k8s.io/api v0.27.2
k8s.io/apiextensions-apiserver v0.27.2
k8s.io/apimachinery v0.27.2
k8s.io/client-go v12.0.0+incompatible
k8s.io/cloud-provider-vsphere v0.0.0
k8s.io/klog v1.0.0
k8s.io/klog/v2 v2.90.1
k8s.io/utils v0.0.0-20230115233650-391b47cb4029
k8s.io/utils v0.0.0-20230209194617-a36077c30491
sigs.k8s.io/controller-tools v0.10.0
sigs.k8s.io/yaml v1.3.0
)
Expand All @@ -128,16 +127,14 @@ require (
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/cjlapao/common-go v0.0.29 // indirect
github.com/coreos/go-semver v0.3.0 // indirect
github.com/coreos/go-systemd/v22 v22.3.2 // indirect
github.com/coreos/go-systemd/v22 v22.4.0 // indirect
github.com/coreos/vcontext v0.0.0-20211021162308-f1dbbca7bef4 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/emicklei/go-restful/v3 v3.10.1 // indirect
github.com/evanphx/json-patch/v5 v5.6.0 // indirect
github.com/fatih/color v1.13.0 // indirect
github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/go-logr/logr v1.2.3 // indirect
github.com/go-logr/logr v1.2.4 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-logr/zapr v1.2.3 // indirect
github.com/go-logr/zapr v1.2.4 // indirect
github.com/go-openapi/analysis v0.21.2 // indirect
github.com/go-openapi/jsonpointer v0.19.6 // indirect
github.com/go-openapi/jsonreference v0.20.2 // indirect
Expand Down Expand Up @@ -198,7 +195,7 @@ require (
github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 // indirect
github.com/pkg/xattr v0.4.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/prometheus/client_model v0.3.0 // indirect
github.com/prometheus/client_model v0.4.0 // indirect
github.com/prometheus/procfs v0.9.0 // indirect
github.com/satori/go.uuid v1.2.0 // indirect
github.com/shurcooL/httpfs v0.0.0-20171119174359-809beceb2371 // indirect
Expand All @@ -211,35 +208,33 @@ require (
go.opentelemetry.io/otel/trace v1.11.1 // indirect
go.uber.org/atomic v1.7.0 // indirect
go.uber.org/multierr v1.6.0 // indirect
go.uber.org/zap v1.21.0 // indirect
golang.org/x/mod v0.9.0 // indirect
golang.org/x/net v0.8.0 // indirect
golang.org/x/sync v0.1.0 // indirect
golang.org/x/text v0.6.0 // indirect
go.uber.org/zap v1.24.0 // indirect
golang.org/x/mod v0.10.0 // indirect
golang.org/x/net v0.10.0 // indirect
golang.org/x/sync v0.2.0 // indirect
golang.org/x/text v0.9.0 // indirect
golang.org/x/time v0.3.0 // indirect
golang.org/x/tools v0.7.0 // indirect
gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect
golang.org/x/tools v0.9.1 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/protobuf v1.28.1 // indirect
google.golang.org/protobuf v1.30.0 // indirect
gopkg.in/djherbis/times.v1 v1.2.0 // indirect
gopkg.in/gcfg.v1 v1.2.3 // indirect
gopkg.in/go-playground/validator.v9 v9.31.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/warnings.v0 v0.1.2 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
gorm.io/gorm v1.23.8 // indirect
k8s.io/component-base v0.25.6 // indirect
k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 // indirect
sigs.k8s.io/controller-runtime v0.13.0 // indirect
k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f // indirect
sigs.k8s.io/controller-runtime v0.14.5 // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
)

// OpenShift Forks
replace (
github.com/metal3-io/baremetal-operator => github.com/openshift/baremetal-operator v0.0.0-20220128094204-28771f489634
github.com/metal3-io/baremetal-operator/apis => github.com/openshift/baremetal-operator/apis v0.0.0-20220128094204-28771f489634
github.com/metal3-io/baremetal-operator/pkg/hardwareutils => github.com/openshift/baremetal-operator/pkg/hardwareutils v0.0.0-20220128094204-28771f489634
github.com/metal3-io/baremetal-operator => github.com/openshift/baremetal-operator v0.0.0-20230531194024-8dde0991ffdd
github.com/metal3-io/baremetal-operator/apis => github.com/openshift/baremetal-operator/apis v0.0.0-20230531194024-8dde0991ffdd
github.com/metal3-io/baremetal-operator/pkg/hardwareutils => github.com/openshift/baremetal-operator/pkg/hardwareutils v0.0.0-20230531194024-8dde0991ffdd
k8s.io/cloud-provider-vsphere => github.com/openshift/cloud-provider-vsphere v1.19.1-0.20211222185833-7829863d0558
sigs.k8s.io/cluster-api => sigs.k8s.io/cluster-api v0.4.5
sigs.k8s.io/cluster-api-provider-aws => github.com/openshift/cluster-api-provider-aws v0.2.1-0.20200929152424-eab2e087f366 // Indirect dependency through MAO from cluster API providers
Expand All @@ -251,14 +246,14 @@ replace github.com/openshift/machine-config-operator => github.com/openshift/mac

// Needed because machine-api-operator uses a "later" v12 version, which is actually an earlier version.
// This should be kept in line with the k8s version used.
replace k8s.io/client-go => k8s.io/client-go v0.25.0
replace k8s.io/client-go => k8s.io/client-go v0.27.2

// Needed so that the InstallConfig CRD can be created. Later versions of controller-gen balk at using IPNet as a field.
replace sigs.k8s.io/controller-tools => sigs.k8s.io/controller-tools v0.3.1-0.20200617211605-651903477185

// Override the OpenShift API version in hive

replace github.com/openshift/api => github.com/openshift/api v0.0.0-20230228142948-d170fcdc0fa6
replace github.com/openshift/api => github.com/openshift/api v0.0.0-20230531161518-2346bf94f19e

replace github.com/terraform-providers/terraform-provider-nutanix => github.com/nutanix/terraform-provider-nutanix v1.5.0

Expand Down Expand Up @@ -291,3 +286,5 @@ replace github.com/containerd/containerd => github.com/containerd/containerd v1.

// https://issues.redhat.com/browse/OCPBUGS-8540
replace go.mongodb.org/mongo-driver => go.mongodb.org/mongo-driver v1.11.2

replace sigs.k8s.io/controller-runtime => sigs.k8s.io/controller-runtime v0.15.0
Loading