cyberark / conjur-authn-k8s-client

Authentication sidecar for Conjur Kubernetes integration.
https://www.conjur.org
Apache License 2.0
11 stars 14 forks source link

Bugfixes: Enterprise-in-GKE test not deploying test apps #452

Closed john-odonnell closed 2 years ago

john-odonnell commented 2 years ago

Desired Outcome

In recent CI runs, the stage running end-to-end tests against Conjur Enterprise in GKE succeed without installing the Namespace Prep Helm chart or deploying the test apps.

From a passing Jenkins run:

++++++++++++++++++++++++++++++++++++++

Installing cluster prep chart

++++++++++++++++++++++++++++++++++++++
. . .
The Conjur/Authenticator Namespace preparation is complete.
 The following have been deployed:
- Golden ConfigMap
- Authenticator ClusterRole
++++++++++++++++++++++++++++++++++++++

Removing test environment

++++++++++++++++++++++++++++++++++++++

Updating this led to another bug: Jenkins logs:

++++++++++++++++++++++++++++++++++++++

Installing namespace prep chart

++++++++++++++++++++++++++++++++++++++
Release "namespace-prep-7bc09deb-9" does not exist. Installing it now.
Error: unable to build kubernetes objects from release manifest: error validating "": error validating data: ValidationError(RoleBinding.subjects[0]): missing required field "name" in io.k8s.api.rbac.v1.Subject

The authnK8sServiceAccount field in the Golden ConfigMap template is wrapped in a conditional, and is only created if the Cluster Prep Helm chart was told to create a serviceAccount. The chart's values.yml file states:

# If 'authnK8s.serviceAccount.create` is set to `true`, then this defaults
# to "conjur-serviceaccount". If 'authnK8s.serviceAccount.create` is set
# to `false`, then this is a required value.
# name: conjur-serviceaccount
# name:

In cases where authnK8s.serviceAccount.create is set to false, the provided name was not being used for the authnK8sServiceAccount field in the Golden ConfigMap.

Implemented Changes

Connected Issue/Story

Resolves #[relevant GitHub issue(s), e.g. 76]

CyberArk internal issue link: [insert issue ID]()

Definition of Done

At least 1 todo must be completed in the sections below for the PR to be merged.

Changelog

Test coverage

Documentation

Behavior

Security