Hi [~dffrench] and [~lfitzgerald].
Regards
bq."requires investigation into whether there is a way we can determine if the operator is running on openshift or kubernetes"
* *When you run OCP you are running the kubernetes.* You never run one or another. The server is Kubernetes. The OCP is just on top of it. The kube is inside of OCP. Note that in your home you will find the .kube dir which is the setup used. * All that worked in kubernetes worked for OCP just the other way arround around is not valid. h4. What I understood that are the current problems faced for [~lfitzgerald]?
* She needs the name of the router and when it is created based on the ingress OCP is not respecting the name and is append a string at it. (See [here](https://github.com/openshift/router/issues/23) for a further understand)
Workaround/Suggestions made so far:
1. Just use the kind in the annotation. ([~lfitzgerald] will try)
{code:java} annotations: serviceaccounts.openshift.io/oauth-redirectreference.primary: '{"kind":"OAuthRedirectReference","apiVersion":"v1","reference":{"kind":"Route"}}’ {code}
2. We could create a group and pass and/or get the name router name created by OCP programmatically.
* She needs setup TLS. We just need to use the ks8 API to implement it in the ingress as follows examples in other operators.
# https://github.com/mercari/certificate-expiry-monitor-controller/blob/36eac97ffae7df101fbcd7e5815106eb8488152e/source/source_test.go#L24
# https://github.com/infinimesh/operator/blob/c9e8de03c19f5daee226df7e7c89a364d8e84d5e/pkg/controller/platform/frontend.go#L122
# https://github.com/presslabs/wordpress-operator/blob/1d285e7cff886ac42fe88a9ec742b824b3c05e17/pkg/controller/wordpress/internal/sync/ingress.go#L79
Following an example of how to solve it in our project.
{code:java} Spec: v1beta1.IngressSpec{ TLS: []v1beta1.IngressTLS{ { Hosts: []string{m.Spec.ClusterHost}, SecretName: "ingressSecret1", }, }, Backend: &v1beta1.IngressBackend{ ServiceName: m.Name, ServicePort: intstr.FromInt(int(m.Spec.Port)), }, Rules: []v1beta1.IngressRule{ { Host: utils.GetAppIngress(m.Spec.ClusterHost, m.Spec.HostSufix), IngressRuleValue: v1beta1.IngressRuleValue{ HTTP: &v1beta1.HTTPIngressRuleValue{ Paths: []v1beta1.HTTPIngressPath{ { Backend: v1beta1.IngressBackend{ ServiceName: m.Name, ServicePort: intstr.FromInt(int(m.Spec.Port)), }, Path: "/", }, }, }, }, }, }, }, {code}
|
|