diff --git a/pkg/asset/manifests/content/bootkube/02-ingress-namespace.go b/pkg/asset/manifests/content/bootkube/02-ingress-namespace.go deleted file mode 100644 index 4eb3c57ec97..00000000000 --- a/pkg/asset/manifests/content/bootkube/02-ingress-namespace.go +++ /dev/null @@ -1,18 +0,0 @@ -package bootkube - -const ( - // IngressNamespace is the constant to represent contents of Ingress_Namespace.yaml file - IngressNamespace = ` ---- -apiVersion: v1 -kind: Namespace -metadata: - # This is the namespace used to hold the tectonic ingress controllers - name: openshift-ingress - # Give the namespace a label, so we can select for it in networkpolicy - labels: - kubernetes.io/ingress.class: tectonic - name: openshift-ingress - openshift.io/run-level: "1" -` -) diff --git a/pkg/asset/manifests/content/bootkube/cvo-overrides.go b/pkg/asset/manifests/content/bootkube/cvo-overrides.go index 21f06e2b43e..145329cbd99 100644 --- a/pkg/asset/manifests/content/bootkube/cvo-overrides.go +++ b/pkg/asset/manifests/content/bootkube/cvo-overrides.go @@ -23,10 +23,6 @@ overrides: namespace: openshift-cluster-network-operator name: cluster-network-operator unmanaged: true -- kind: Deployment # this conflicts with tectonic-ingress-controller-operator - namespace: openshift-ingress-operator - name: ingress-operator - unmanaged: true - kind: ServiceAccount # missing run level 0 on the namespace and has 0000_08 namespace: openshift-cluster-dns-operator name: cluster-dns-operator diff --git a/pkg/asset/manifests/content/tectonic/tectonic-ingress-00-appversion.go b/pkg/asset/manifests/content/tectonic/tectonic-ingress-00-appversion.go deleted file mode 100644 index d5e43f72fb5..00000000000 --- a/pkg/asset/manifests/content/tectonic/tectonic-ingress-00-appversion.go +++ /dev/null @@ -1,22 +0,0 @@ -package tectonic - -const ( - // AppVersionTectonicIngress is the variable/constant representing the contents of the respective file - AppVersionTectonicIngress = ` ---- -apiVersion: tco.coreos.com/v1 -kind: AppVersion -metadata: - name: tectonic-ingress - namespace: tectonic-system - labels: - managed-by-channel-operator: "true" -spec: - desiredVersion: - paused: false -status: - paused: false -upgradereq: 1 -upgradecomp: 0 -` -) diff --git a/pkg/asset/manifests/content/tectonic/tectonic-ingress-01-cluster-config.go b/pkg/asset/manifests/content/tectonic/tectonic-ingress-01-cluster-config.go deleted file mode 100644 index 7e159bcdef9..00000000000 --- a/pkg/asset/manifests/content/tectonic/tectonic-ingress-01-cluster-config.go +++ /dev/null @@ -1,23 +0,0 @@ -package tectonic - -import ( - "text/template" -) - -var ( - // ClusterConfigTectonicIngress is the variable/constant representing the contents of the respective file - ClusterConfigTectonicIngress = template.Must(template.New("tectonic-ingress-01-cluster-config.yaml").Parse(` -apiVersion: v1 -kind: ConfigMap -metadata: - name: cluster-config-v1 - namespace: openshift-ingress -data: - ingress-config: | - apiVersion: v1 - kind: TectonicIngressOperatorConfig - type: {{.IngressKind}} - statsPassword: {{.IngressStatusPassword}} - statsUsername: admin -`)) -) diff --git a/pkg/asset/manifests/content/tectonic/tectonic-ingress-02-tls.go b/pkg/asset/manifests/content/tectonic/tectonic-ingress-02-tls.go deleted file mode 100644 index 740d400e8d2..00000000000 --- a/pkg/asset/manifests/content/tectonic/tectonic-ingress-02-tls.go +++ /dev/null @@ -1,21 +0,0 @@ -package tectonic - -import ( - "text/template" -) - -var ( - // TLSTectonicIngress is the variable/constant representing the contents of the respective file - TLSTectonicIngress = template.Must(template.New("tectonic-ingress-02-tls.yaml").Parse(` -apiVersion: v1 -kind: Secret -metadata: - name: tectonic-ingress-tls - namespace: openshift-ingress -type: Opaque -data: - tls.crt: {{.IngressTLSCert}} - tls.key: {{.IngressTLSKey}} - bundle.crt: {{.IngressTLSBundle}} -`)) -) diff --git a/pkg/asset/manifests/content/tectonic/tectonic-ingress-03-pull.go b/pkg/asset/manifests/content/tectonic/tectonic-ingress-03-pull.go deleted file mode 100644 index dd4d8287239..00000000000 --- a/pkg/asset/manifests/content/tectonic/tectonic-ingress-03-pull.go +++ /dev/null @@ -1,23 +0,0 @@ -package tectonic - -import ( - "text/template" -) - -var ( - // PullTectonicIngress is the variable/constant representing the contents of the respective file - PullTectonicIngress = template.Must(template.New("tectonic-ingress-03-pull.json").Parse(` -{ - "apiVersion": "v1", - "kind": "Secret", - "type": "kubernetes.io/dockerconfigjson", - "metadata": { - "namespace": "openshift-ingress", - "name": "coreos-pull-secret" - }, - "data": { - ".dockerconfigjson": "{{.PullSecret}}" - } -} -`)) -) diff --git a/pkg/asset/manifests/content/tectonic/tectonic-ingress-04-svc-account.go b/pkg/asset/manifests/content/tectonic/tectonic-ingress-04-svc-account.go deleted file mode 100644 index f00683bc748..00000000000 --- a/pkg/asset/manifests/content/tectonic/tectonic-ingress-04-svc-account.go +++ /dev/null @@ -1,12 +0,0 @@ -package tectonic - -const ( - // SvcAccountTectonicIngress is the variable/constant representing the contents of the respective file - SvcAccountTectonicIngress = ` -apiVersion: v1 -kind: ServiceAccount -metadata: - name: tectonic-ingress-controller-operator - namespace: openshift-ingress -` -) diff --git a/pkg/asset/manifests/content/tectonic/tectonic-ingress-05-operator.go b/pkg/asset/manifests/content/tectonic/tectonic-ingress-05-operator.go deleted file mode 100644 index 1df2a60fe63..00000000000 --- a/pkg/asset/manifests/content/tectonic/tectonic-ingress-05-operator.go +++ /dev/null @@ -1,63 +0,0 @@ -package tectonic - -import ( - "text/template" -) - -var ( - // TectonicIngressControllerOperator is the variable/constant representing the contents of the respective file - TectonicIngressControllerOperator = template.Must(template.New("tectonic-ingress-05-operator.yaml").Parse(` -apiVersion: apps/v1beta2 -kind: Deployment -metadata: - name: tectonic-ingress-controller-operator - namespace: openshift-ingress - labels: - k8s-app: tectonic-ingress-controller-operator - managed-by-channel-operator: "true" -spec: - replicas: 1 - selector: - matchLabels: - k8s-app: tectonic-ingress-controller-operator - template: - metadata: - labels: - k8s-app: tectonic-ingress-controller-operator - tectonic-app-version-name: tectonic-ingress - spec: - containers: - - name: tectonic-ingress-controller-operator - image: {{.TectonicIngressControllerOperatorImage}} - resources: - limits: - cpu: 20m - memory: 50Mi - requests: - cpu: 20m - memory: 50Mi - volumeMounts: - - name: cluster-config - mountPath: /etc/cluster-config - imagePullSecrets: - - name: coreos-pull-secret - nodeSelector: - node-role.kubernetes.io/master: "" - restartPolicy: Always - securityContext: - runAsNonRoot: true - runAsUser: 65534 - serviceAccount: tectonic-ingress-controller-operator - tolerations: - - key: "node-role.kubernetes.io/master" - operator: "Exists" - effect: "NoSchedule" - volumes: - - name: cluster-config - configMap: - name: cluster-config-v1 - items: - - key: ingress-config - path: ingress-config -`)) -) diff --git a/pkg/asset/manifests/content/tectonic/tectonic-system-01-ca-cert.go b/pkg/asset/manifests/content/tectonic/tectonic-system-01-ca-cert.go deleted file mode 100644 index 8d7bbc50bb5..00000000000 --- a/pkg/asset/manifests/content/tectonic/tectonic-system-01-ca-cert.go +++ /dev/null @@ -1,19 +0,0 @@ -package tectonic - -import ( - "text/template" -) - -var ( - // CaCertTectonicSystem is the variable/constant representing the contents of the respective file - CaCertTectonicSystem = template.Must(template.New("tectonic-system-01-ca-cert.yaml").Parse(` -apiVersion: v1 -kind: Secret -metadata: - name: tectonic-ca-cert-secret - namespace: tectonic-system -type: Opaque -data: - ca-cert: {{.IngressCaCert}} -`)) -) diff --git a/pkg/asset/manifests/operators.go b/pkg/asset/manifests/operators.go index eb9b8cc9201..4b5efb978d9 100644 --- a/pkg/asset/manifests/operators.go +++ b/pkg/asset/manifests/operators.go @@ -190,7 +190,6 @@ func (m *Manifests) generateBootKubeManifests(dependencies asset.Parents) []*ass "etcd-service-endpoints.yaml": applyTemplateData(bootkube.EtcdServiceEndpointsKubeSystem, templateData), "01-tectonic-namespace.yaml": []byte(bootkube.TectonicNamespace), - "02-ingress-namespace.yaml": []byte(bootkube.IngressNamespace), "03-openshift-web-console-namespace.yaml": []byte(bootkube.OpenshiftWebConsoleNamespace), "04-openshift-machine-config-operator.yaml": []byte(bootkube.OpenshiftMachineConfigOperator), "05-openshift-cluster-api-namespace.yaml": []byte(bootkube.OpenshiftClusterAPINamespace), diff --git a/pkg/asset/manifests/tectonic.go b/pkg/asset/manifests/tectonic.go index 080419bf625..4df2b40d87f 100644 --- a/pkg/asset/manifests/tectonic.go +++ b/pkg/asset/manifests/tectonic.go @@ -1,7 +1,6 @@ package manifests import ( - "bytes" "encoding/base64" "path/filepath" @@ -53,24 +52,15 @@ func (t *Tectonic) Dependencies() []asset.Asset { // Generate generates the respective operator config.yml files func (t *Tectonic) Generate(dependencies asset.Parents) error { installConfig := &installconfig.InstallConfig{} - ingressCertKey := &tls.IngressCertKey{} - kubeCA := &tls.KubeCA{} clusterk8sio := &machines.ClusterK8sIO{} worker := &machines.Worker{} master := &machines.Master{} addon := &kubeAddonOperator{} - dependencies.Get(installConfig, ingressCertKey, kubeCA, clusterk8sio, worker, master, addon) + dependencies.Get(installConfig, clusterk8sio, worker, master, addon) templateData := &tectonicTemplateData{ - IngressCaCert: base64.StdEncoding.EncodeToString(kubeCA.Cert()), - IngressKind: "haproxy-router", - IngressStatusPassword: installConfig.Config.Admin.Password, // FIXME: generate a new random one instead? - IngressTLSBundle: base64.StdEncoding.EncodeToString(bytes.Join([][]byte{ingressCertKey.Cert(), ingressCertKey.Key()}, []byte{})), - IngressTLSCert: base64.StdEncoding.EncodeToString(ingressCertKey.Cert()), - IngressTLSKey: base64.StdEncoding.EncodeToString(ingressCertKey.Key()), - KubeAddonOperatorImage: "quay.io/coreos/kube-addon-operator-dev:375423a332f2c12b79438fc6a6da6e448e28ec0f", - PullSecret: base64.StdEncoding.EncodeToString([]byte(installConfig.Config.PullSecret)), - TectonicIngressControllerOperatorImage: "quay.io/coreos/tectonic-ingress-controller-operator-dev:375423a332f2c12b79438fc6a6da6e448e28ec0f", + KubeAddonOperatorImage: "quay.io/coreos/kube-addon-operator-dev:375423a332f2c12b79438fc6a6da6e448e28ec0f", + PullSecret: base64.StdEncoding.EncodeToString([]byte(installConfig.Config.PullSecret)), } assetData := map[string][]byte{ @@ -84,14 +74,7 @@ func (t *Tectonic) Generate(dependencies asset.Parents) error { "99_openshift-cluster-api_worker-user-data-secret.yaml": worker.UserDataSecretRaw, "99_role-admin.yaml": []byte(content.RoleAdmin), "99_role-user.yaml": []byte(content.RoleUser), - "99_tectonic-ingress-00-appversion.yaml": []byte(content.AppVersionTectonicIngress), - "99_tectonic-ingress-01-cluster-config.yaml": applyTemplateData(content.ClusterConfigTectonicIngress, templateData), - "99_tectonic-ingress-02-tls.yaml": applyTemplateData(content.TLSTectonicIngress, templateData), - "99_tectonic-ingress-03-pull.json": applyTemplateData(content.PullTectonicIngress, templateData), - "99_tectonic-ingress-04-svc-account.yaml": []byte(content.SvcAccountTectonicIngress), - "99_tectonic-ingress-05-operator.yaml": applyTemplateData(content.TectonicIngressControllerOperator, templateData), "99_tectonic-system-00-binding-admin.yaml": []byte(content.BindingAdmin), - "99_tectonic-system-01-ca-cert.yaml": applyTemplateData(content.CaCertTectonicSystem, templateData), "99_tectonic-system-02-pull.json": applyTemplateData(content.PullTectonicSystem, templateData), } diff --git a/pkg/asset/manifests/template.go b/pkg/asset/manifests/template.go index 22dd4d7aeee..4eb5c07929e 100644 --- a/pkg/asset/manifests/template.go +++ b/pkg/asset/manifests/template.go @@ -35,13 +35,6 @@ type bootkubeTemplateData struct { } type tectonicTemplateData struct { - IngressCaCert string - IngressKind string - IngressStatusPassword string - IngressTLSBundle string - IngressTLSCert string - IngressTLSKey string - KubeAddonOperatorImage string - PullSecret string - TectonicIngressControllerOperatorImage string + KubeAddonOperatorImage string + PullSecret string }