Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[release-3.11] Correct service serving secret name in the annotation #11119

Merged
merged 1 commit into from Mar 1, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -64,14 +64,27 @@
- ('OPENSHIFT_CERT_DATA' in router_env_vars)
- ('OPENSHIFT_KEY_DATA' in router_env_vars)

- name: Delete existing router certificate secret
vrutkovs marked this conversation as resolved.
Show resolved Hide resolved
oc_secret:
kubeconfig: "{{ router_cert_redeploy_tempdir.stdout }}/admin.kubeconfig"
name: router-certs
namespace: default
state: absent
run_once: true
when:
- l_router_dc.rc == 0
- l_router_svc.rc == 0
- ('router-certs' in router_secrets)
- openshift_hosted_router_certificate is undefined

# When the router service contains service signer annotations we
# will delete the existing certificate secret and allow OpenShift to
# replace the secret.
- block:
- name: Delete existing router certificate secret
- name: Delete existing router metrics certificate secret
oc_secret:
kubeconfig: "{{ router_cert_redeploy_tempdir.stdout }}/admin.kubeconfig"
name: router-certs
name: router-metrics-tls
namespace: default
state: absent
run_once: true
Expand All @@ -87,14 +100,13 @@
- name: Add serving-cert-secret annotation to router service
command: >
{{ openshift_client_binary }} annotate service/router
service.alpha.openshift.io/serving-cert-secret-name=router-certs
service.alpha.openshift.io/serving-cert-secret-name=router-metrics-tls
vrutkovs marked this conversation as resolved.
Show resolved Hide resolved
--config={{ router_cert_redeploy_tempdir.stdout }}/admin.kubeconfig
-n default
when:
- l_router_dc.rc == 0
- l_router_svc.rc == 0
- ('router-certs' in router_secrets)
- openshift_hosted_router_certificate is undefined
vrutkovs marked this conversation as resolved.
Show resolved Hide resolved
- ('router-metrics-tls' in router_secrets)
- ('service.alpha.openshift.io/serving-cert-secret-name') in router_service_annotations
- ('service.alpha.openshift.io/serving-cert-signed-by') in router_service_annotations

Expand Down