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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
366 changes: 276 additions & 90 deletions Gopkg.lock

Large diffs are not rendered by default.

44 changes: 17 additions & 27 deletions Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,52 +23,42 @@ required = [
non-go = false
unused-packages = false

# Operator internals

[[override]]
name = "k8s.io/code-generator"
version = "kubernetes-1.12.5"
[[constraint]]
name = "sigs.k8s.io/controller-runtime"
version = "=v0.1.9"

[[override]]
[[constraint]]
name = "github.com/kevinburke/go-bindata"
version = "v3.13.0"
version = "=v3.11.0"

[[override]]
name = "github.com/openshift/api"
revision = "31ed61683850951801cddda5b075fcb24a500532"

[[override]]
name = "github.com/coreos/prometheus-operator"
version = "v0.28.0"
[[constraint]]
name = "github.com/aws/aws-sdk-go"
version = "=v1.15.72"

[[override]]
[[constraint]]
name = "github.com/openshift/library-go"
revision = "cef3bac303c956844aa15215630d26b1e0a1085a"

[[override]]
name = "github.com/aws/aws-sdk-go"
version = "v1.16.26"
name = "github.com/openshift/api"
revision = "abd194123b1ba2dcf9fd383f995c0082c81a8e6a"

[[override]]
name = "github.com/google/go-cmp"
version = "v0.2.0"
name = "k8s.io/code-generator"
version = "kubernetes-1.12.5"

[[override]]
name = "k8s.io/api"
version = "kubernetes-1.13.1"
version = "kubernetes-1.12.5"

[[override]]
name = "k8s.io/apiextensions-apiserver"
version = "kubernetes-1.13.1"
version = "kubernetes-1.12.5"

[[override]]
name = "k8s.io/apimachinery"
version = "kubernetes-1.13.1"
version = "kubernetes-1.12.5"

[[override]]
name = "k8s.io/client-go"
version = "kubernetes-1.13.1"

[[override]]
name = "sigs.k8s.io/controller-runtime"
version = "v0.1.10"
version = "kubernetes-1.12.5"
20 changes: 0 additions & 20 deletions assets/router/metrics/service-monitor.yaml

This file was deleted.

19 changes: 5 additions & 14 deletions cmd/cluster-ingress-operator/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"context"
"fmt"
"os"
"strings"

"github.com/openshift/cluster-ingress-operator/pkg/dns"
awsdns "github.com/openshift/cluster-ingress-operator/pkg/dns/aws"
Expand Down Expand Up @@ -77,15 +76,8 @@ func main() {
logrus.Fatalf("failed to get dns 'cluster': %v", err)
}

// Retrieve the typed cluster version config.
clusterVersionConfig := &configv1.ClusterVersion{}
err = kubeClient.Get(context.TODO(), types.NamespacedName{Name: "version"}, clusterVersionConfig)
if err != nil {
logrus.Fatalf("failed to get clusterversion 'version': %v", err)
}

// Set up the DNS manager.
dnsManager, err := createDNSManager(kubeClient, operatorNamespace, infraConfig, ingressConfig, dnsConfig, clusterVersionConfig)
dnsManager, err := createDNSManager(kubeClient, operatorNamespace, infraConfig, dnsConfig)
Copy link
Contributor

Choose a reason for hiding this comment

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

We can also delete the get at line 80, and the RBAC rule in 00-cluster-role.yaml.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

if err != nil {
logrus.Fatalf("failed to create DNS manager: %v", err)
}
Expand All @@ -108,7 +100,7 @@ func main() {

// createDNSManager creates a DNS manager compatible with the given cluster
// configuration.
func createDNSManager(cl client.Client, namespace string, infraConfig *configv1.Infrastructure, ingressConfig *configv1.Ingress, dnsConfig *configv1.DNS, clusterVersionConfig *configv1.ClusterVersion) (dns.Manager, error) {
func createDNSManager(cl client.Client, namespace string, infraConfig *configv1.Infrastructure, dnsConfig *configv1.DNS) (dns.Manager, error) {
var dnsManager dns.Manager
switch infraConfig.Status.Platform {
case configv1.AWSPlatform:
Expand All @@ -118,10 +110,9 @@ func createDNSManager(cl client.Client, namespace string, infraConfig *configv1.
return nil, fmt.Errorf("failed to get aws creds from %s/%s: %v", awsCreds.Namespace, awsCreds.Name, err)
}
manager, err := awsdns.NewManager(awsdns.Config{
AccessID: string(awsCreds.Data["aws_access_key_id"]),
AccessKey: string(awsCreds.Data["aws_secret_access_key"]),
BaseDomain: strings.TrimSuffix(dnsConfig.Spec.BaseDomain, ".") + ".",
ClusterID: string(clusterVersionConfig.Spec.ClusterID),
AccessID: string(awsCreds.Data["aws_access_key_id"]),
AccessKey: string(awsCreds.Data["aws_secret_access_key"]),
DNS: dnsConfig,
})
if err != nil {
return nil, fmt.Errorf("failed to create AWS DNS manager: %v", err)
Expand Down
2 changes: 1 addition & 1 deletion hack/uninstall.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
set -uo pipefail

WHAT="${WHAT:-all}"
WHAT="${WHAT:-managed}"

# Disable the CVO
oc scale --replicas 0 -n openshift-cluster-version deployments/cluster-version-operator
Expand Down
1 change: 0 additions & 1 deletion manifests/00-cluster-role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ rules:
- infrastructures
- ingresses
- dnses
- clusterversions
verbs:
- get

Expand Down
Loading