Skip to content
  • Stephen Greene's avatar
    Ingress: Mount router stats secret as a volume · 7b3f4031
    Stephen Greene authored
    https://github.com/openshift/router/pull/291 gave the router
    the ability to use stats credentials contained in separate username
    and password files for security reasons.
    This commit modifies the Ingress deployment so that the router-stats
    secret is mounted into router pods, and the filenames for the username
    and password files are passed to the Router binary via new
    environment variables.
    
    pkg/operator/controller/ingress/deployment.go:
    
    Add a new volume and volume mount for the router stats secret.
    Replace the STATS_USERNAME and STATS_PASSWORD environment variables with
    the new STATS_USER_NAME_FILE and STATS_PASSWORD_FILE environment
    variables.
    
    pkg/operator/controller/ingress/deployment_test.go:
    
    Update `TestDeploymentConfigChanged` to reflect the new stats-auth
    volume.
    
    Update `TestDesiredRouterDeployment` to verify that the expected
    volumes exist with the proper secret references.
    
    This commit is in support of Bug 1955822.
    7b3f4031