-
Notifications
You must be signed in to change notification settings - Fork 14
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
Demo supports Conjur OSS and annotation-based authn-k8s #107
Conversation
7e1529d
to
483120b
Compare
07cc486
to
0f2dd66
Compare
e4f0461
to
055ada3
Compare
README.md
Outdated
before running the demo scripts: | ||
|
||
``` | ||
export DEPLOY_MASTER_CLUSTER=true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can't include this here - the DEPLOY_MASTER_CLUSTER
flow is for dev only. Looking at your README updates I think there is a bit more reorganization we could do to make this extra-clear for this project - would you want to get on a call to chat about this today? Alternatively I could try to write up something based off of your branch to show what I am thinking.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm all ears. Whichever way you think is most efficient.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@izgeri - Thank you for the proposed changes! I incorporated your changes, but left out the command sequences for initializing the Conjur CA and loading policy since those commands are in the scripts (as optional parts of the script).
I took a stab at going a step further to reconcile this with our other repos and guides. I think we're getting closer to parity, but could maybe use a few more rounds of polishing.
I reordered, reorganized, and renamed the scripts to reconcile this workflow with our other repos. In the script names, I included either prep
or admin
or app
to distinguish whether what's done in each script is usually preparation vs. tasks done by a security admin vs. tasks done to deploy the actual app without admin access. The scripts are now:
0_prep_check_dependencies.sh
1_prep_platform_login.sh
2_admin_load_conjur_policies.sh
3_admin_init_conjur_cert_authority.sh
4_app_create_namespace.sh
5_app_store_conjur_cert.sh
6_app_build_and_push_containers.sh
7_app_deploy.sh
8_app_verify_authentication.sh
In the README, I tried to explain the distinctions between the security admin and app deploy steps.
The CI is passing again, this is ready for re-review.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @diverdane! I'm looking forward to reading this, but as I'm just seeing it now I won't get to it until Tuesday due to the long weekend. I really appreciate your thoughtful approach to the organization of the scripts in this project!
e297a80
to
eeef8af
Compare
eeef8af
to
5b8e937
Compare
82c79ac
to
17a52b3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is such a great and welcome body of work! The changes to the README are a massive improvement. I left only a couple comments but I think this looks great!
|
||
RETRIES=150 | ||
# Seconds | ||
RETRY_WAIT=2 | ||
|
||
# Dump some kubernetes resources and Conjur authentication policy if this | ||
# script exits prematurely | ||
DETAILED_DUMP_ON_EXIT=true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
@@ -217,6 +232,7 @@ deploy_init_container_app_with_host_outside_apps() { | |||
sed "s#{{ TEST_APP_NAMESPACE_NAME }}#$TEST_APP_NAMESPACE_NAME#g" | | |||
sed "s#{{ AUTHENTICATOR_ID }}#$AUTHENTICATOR_ID#g" | | |||
sed "s#{{ CONFIG_MAP_NAME }}#$TEST_APP_NAMESPACE_NAME#g" | | |||
sed "s#{{ SERVICE_TYPE }}#$(app_service_type)#g" | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should really get rid of all the sed
stuff, and confirm the manifests to x.yml.sh
. I think that pattern is a lot easier to maintain and work with.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a great idea! Or, we could use Helm charts for all of the Kubernetes YAML files, and Yaml.sh for the Conjur policy templating?
That said, I think this might be best handled as tech debt outside of the scope of our auth-k8s UX work.
I filed this issue for this cleanup: #113
17a52b3
to
1e799d5
Compare
@kumbi, thanks for the review!
|
1e799d5
to
8f2ea26
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great! For some reason the build is currently failing, once that's resolve I hink we should be good to proceed. Before merging I also wanted to make sure that there aren't an other repos using this project that might break e.g. DEPLOY_MASTER_CLUSTER
is no longer being used.
@@ -89,6 +91,7 @@ function prepareTestEnvironment() { | |||
export CONJUR_NAMESPACE_NAME=conjur-5-$UNIQUE_TEST_ID-test | |||
export AUTHENTICATOR_ID=conjur-5-$UNIQUE_TEST_ID-test | |||
export TEST_APP_NAMESPACE_NAME=test-app-5-$UNIQUE_TEST_ID | |||
export CONFIGURE_CONJUR_MASTER=true | |||
|
|||
export DEPLOY_MASTER_CLUSTER=true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can get rid of this now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We still need to include this export because the scripts also clone and run the cyberark/kubernetes-conjur-deploy scripts, and those depend upon the DEPLOY_MASTER_CLUSTER
environment variable.
To prevent possible breakage in the scenario where another repo is cloning & running this kubernetes-conjur-demo script repo, what I can do is this:
- In set_env_vars.sh, default the
DEPLOY_MASTER_CLUSTER
tofalse
- In set_env_vars.sh, default the
CONFIGURE_CONJUR_MASTER
to$DEPLOY_MASTER_CLUSTER
So the precedence for the value of CONFIGURE_CONJUR_MASTER
would be:
CONFIGURE_CONJUR_MASTER
env var, if that's set explicitly, otherwise...DEPLOY_MASTER_CLUSTER
env var, if that's set explicitly, otherwise...false
That means for any existing workflow that depends upon DEPLOY_MASTER_CLUSTER
and is unaware of the newer lingo CONFIGURE_CONJUR_MASTER
, item 2 will cover them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@diverdane Thank you I think this should work perfectly fine. I wonder if it's a good idea to invest (in the future) in finding all the things we care about that depend on this and overhauling them to the new.
For the life of me, I can't figure out why this failed. Just before the point of failure, the
But then moments later, there's an error revolving around this service not existing:
I looked to see that all of the parallel OpenShift CI tests that are happening are using their own projects (namespaces), and they definitely are, so it's not being caused by deletion of a project/namespace by another parallel test. I'm going to re-run the tests. |
8f2ea26
to
2da6bf4
Compare
@kumbi, I made a stab at making sure that these scripts are backwards-compatible with other repos that use these scripts and make use of the |
2da6bf4
to
826965b
Compare
This change adds support for: - Running demo scripts directly on a Conjur OSS cluster that has been deployed via Conjur OSS Helm chart. - Creation of a Conjur CLI pod if it doesn't exist. - Selectable operation for annotation-based authn-k8s vs. host-ID-based authn-k8s. - Running demo scripts on platforms that do not have a load balancer configured (e.g. for testing on KinD or Minikube without having to load MetalLB). - CI for host-ID based identity authentication for GKE and OpenShift. - CI for annotation based identity authentication for GKE. Addresses Issue #106
826965b
to
a8c21fe
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Once again, really great work! This is just such a comprehensively great update.
@@ -89,6 +91,7 @@ function prepareTestEnvironment() { | |||
export CONJUR_NAMESPACE_NAME=conjur-5-$UNIQUE_TEST_ID-test | |||
export AUTHENTICATOR_ID=conjur-5-$UNIQUE_TEST_ID-test | |||
export TEST_APP_NAMESPACE_NAME=test-app-5-$UNIQUE_TEST_ID | |||
export CONFIGURE_CONJUR_MASTER=true | |||
|
|||
export DEPLOY_MASTER_CLUSTER=true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@diverdane Thank you I think this should work perfectly fine. I wonder if it's a good idea to invest (in the future) in finding all the things we care about that depend on this and overhauling them to the new.
This change includes:
deployed via Conjur OSS Helm chart.
e.g. for running with Conjur OSS).
vs. steps that are done to deploy the application.
steps to reconcile this documentation with our other community repos.
Addresses Issue #106, Issue #92, and Issue #108