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

#322 Set config store to be included by default #329

Merged
merged 1 commit into from
Sep 16, 2024

Conversation

carter-cundiff
Copy link
Contributor

  • Update documentation to live under supporting components

@carter-cundiff carter-cundiff force-pushed the 322-default-universal-config-store branch from d500e5d to 1a87b9b Compare September 12, 2024 15:51
This file defines two properties, `connector` and `topic`, each with the group name `messaging`.

===== Environment Specific Overrides
In addition to the base properties file introduced above, one can optionally specify a secondary properties file that houses environment
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

S: Again I think we can largely lean on Krausening docs here and only call out the aiSSEMBLE-specific stuff.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at the krausening related section for this, while it does explain how the extension works, I think it introduces too many unrelated details. Specifically the stuff the env var KRAUSENING_EXTENSIONS and the code block for retrieving the properties.

Would rather just keep a straightforward example here that just focus on the properties files.


==== Mounting Properties
In order for the store to read the configurations, the properties files will need to be placed into a https://kubernetes.io/docs/concepts/storage/persistent-volumes/#lifecycle-of-a-volume-and-claimpersistent[Persistent Volume,role=external,window=_blank] (PV)
mounted to the configuration store kubernetes resource. It is assumed a PV will meet most projects needs and is the most widely accepted
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

S: We've got a fine line to walk here between convenience/comprehensiveness in the antora docs, and confining chart-specific details to the chart documentation. I think what we have is a pretty good split, but I think we could pull it up even a little higher here. For instance instead of getting into "Persistent Volumes" specifically, we can just say the high-level goal: Attaching the properties to the local file system of the service through a mounted volume. I don't have great specifics here, but maybe the key question is: Could someone with very little Kubernetes/Helm knowledge read the paragraph and get good understanding of what's happening and why (even if they don't fully understand the "how").

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Echoing the above, whether right or wrong, a takeaway I could have from this is that a persistent volume is the only option. I think I agree that it would be better to pull this up slightly.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Brought up to higher level by removing kubernetes specific wording.

[source,yaml]
----
env:
BASE_PROPERTY: <URI housing base property configurations>
Copy link
Contributor

@ewilkins-csi ewilkins-csi Sep 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

S: This is an example of the type of detail that I think is may be too much for these docs. There are two risks with this example: 1) it muddies the waters of the overall explanation of the feature and generally how it works, and 2) it's very likely to fall out of date as the chart changes.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

S: I found this section to be a bit confusing. To be fair, I am not sure how much of the "how" a developer needs/wants to know in order to configure these things appropriately for their project. My question for this section is what do we really want the reader to take away from it? If you were to list out those 3-4 high level bullets, maybe that would help make this more succinct?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved technical portion to helm chart README

Copy link
Collaborator

@nartieri nartieri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added some substantive and administrative feedback. Happy to discuss as needed.

In addition to the base properties file introduced above, one can optionally specify a secondary properties file that houses environment
specific configurations. These configurations will then used to override their respective base configurations.

Continuing with the example above, suppose one defines an additional properties file named `messaging.properties` like the following:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?: Would it be common to have to properties files (a base and an environment specific properties file) with the same name? I guess it is a bit confusing as it feels like it would make things more difficult to manage.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In theory they would need to be the same name but in different directories for the environment ovverride to work. This is no longer applicable though as I removed the property file names from this section to make it less confusing.


==== Mounting Properties
In order for the store to read the configurations, the properties files will need to be placed into a https://kubernetes.io/docs/concepts/storage/persistent-volumes/#lifecycle-of-a-volume-and-claimpersistent[Persistent Volume,role=external,window=_blank] (PV)
mounted to the configuration store kubernetes resource. It is assumed a PV will meet most projects needs and is the most widely accepted
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A: If the existing text remains I would reword to "...a PV will meet the needs of most projects and is the..."

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Text removed.


==== Mounting Properties
In order for the store to read the configurations, the properties files will need to be placed into a https://kubernetes.io/docs/concepts/storage/persistent-volumes/#lifecycle-of-a-volume-and-claimpersistent[Persistent Volume,role=external,window=_blank] (PV)
mounted to the configuration store kubernetes resource. It is assumed a PV will meet most projects needs and is the most widely accepted
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Echoing the above, whether right or wrong, a takeaway I could have from this is that a persistent volume is the only option. I think I agree that it would be better to pull this up slightly.

[source,yaml]
----
env:
BASE_PROPERTY: <URI housing base property configurations>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

S: I found this section to be a bit confusing. To be fair, I am not sure how much of the "how" a developer needs/wants to know in order to configure these things appropriately for their project. My question for this section is what do we really want the reader to take away from it? If you were to list out those 3-4 high level bullets, maybe that would help make this more succinct?

}
----

NOTE: The name of the configuration service may vary depending on the projects helm chart configuration, by default it is
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A: missing apostrophe - project's

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

NOTE: The name of the configuration service may vary depending on the projects helm chart configuration, by default it is
`http://configuration-store.config-store-ns.svc:8083`

==== Resource Injection
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A: Should this be Kubernetes Resource Injection to match what we called it above?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated


==== Resource Injection
The configuration store provisions a https://kubernetes.io/docs/reference/access-authn-authz/extensible-admission-controllers/[kubernetes admission webhook,role=external,window=_blank] as part of its deployment. This webhook is used for injecting property values
from the configuration store directly into kubernetes resources as they deployed to the cluster.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A: recommend minor edit to "...as they are deployed..."

?: Something that struck me as I was reading through this page is we give examples of using what we have built, but don't necessarily give examples of when to use them, or why you would choose one approach over another. You can tell me to pound sand if that is not something we typically do and is why we did not do it here. But I do wonder if providing some help to the user would be useful. E.g., when would they want to use the REST endpoint/API vice Kubernetes Resource Injection; when should they use Krausening vs Vault, and maybe some others. Anyway, it is just a bit of food for thought.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The backend storage section gives a little insight into why you would want to use the different options.

In terms of the REST Endpoint vs kubernetes injection, I think the injection is the preferred method and can be used in replacement of the REST Endpoint in most use cases. However, at the end of the day it really comes down to user preference if they'd rather use the endpoint.

NOTE: The `topic` property is overwritten when the environment specific value `ciTopic`.

==== Deploying the Configuration Store
The https://github.com/boozallen/aissemble/blob/{git-tree}/extensions/extensions-helm/aissemble-configuration-store-chart/README.md[configuration store helm chart,role=external,window=_blank] is used for easily deploying it to a Kubernetes cluster. As part of the deployment, one must
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The https://github.com/boozallen/aissemble/blob/{git-tree}/extensions/extensions-helm/aissemble-configuration-store-chart/README.md[configuration store helm chart,role=external,window=_blank] is used for easily deploying it to a Kubernetes cluster. As part of the deployment, one must
The https://github.com/boozallen/aissemble/blob/{git-tree}/extensions/extensions-helm/aissemble-configuration-store-chart/README.md[Configuration Store Helm chart,role=external,window=_blank] can easily deploy the store to a Kubernetes cluster. As part of the deployment, one must

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if we're capitalizing "Configuration Store". I'm fine with either, but Helm should be capitalized.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Capitalized all helms and config stores

@carter-cundiff carter-cundiff force-pushed the 322-default-universal-config-store branch 2 times, most recently from 670a005 to 262272f Compare September 13, 2024 17:44
@carter-cundiff carter-cundiff force-pushed the 322-default-universal-config-store branch 5 times, most recently from e3bef9d to 602b286 Compare September 16, 2024 15:43
@@ -1,10 +0,0 @@
# Default values for aissemble-jenkins.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I: Delete file mistakenly committed to dev

@@ -19,30 +19,4 @@ AWS_SECRET_ACCESS_KEY=base-secret-access-key
```

### Handling Load Status
The `ConfigLoader` leverages `load-status` to detect whether properties were already fully loaded or only partially loaded due to an interrupted process. The code logic ensures that a `fully-loaded` status is set when properties are loaded successfully. This status is then used to skip loading if the properties were successfully loaded previously, thus avoiding unnecessary reloading during deployment refreshes. For details on this behavior, refer to the implementation code and comments in the `ConfigLoader` class.

### Inject Configuration Value
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I: Moved content to antora docs

@@ -21,7 +21,6 @@ aissemble-configuration-store-chart:
supplementalVolumeMounts:
- name: configurations
mountPath: "/configurations"
readOnly: true
Copy link
Contributor

@cwoods-cpointe cwoods-cpointe Sep 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

q/s: do we not we want to keep the original PVC as read only?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally yes, but it introduces a bug with argoCD (#309). So this is a temp fix for MVP until we get time to further investigate the issue.

@@ -944,7 +961,7 @@ private NotificationParams configureNotification(File optionalRoot, String profi
params.setPomFilePath(deployDir + File.separator + "pom.xml");
params.setProfileConfiguration("<profile>" + profile + "</profile>");
params.setPomFile(new File(params.getPomFilePath()));
params.setKey(getMessageKey(params.getPomFilePath(), "execution", appName));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A/Q: Feels like it would be more consistent to have the relative path to the POM file here. Can we not relativize against the root like we have elsewhere? (Not sure why it's called "optionalRoot" given the code just uses it directly for setPomFilePath.)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update to set key with relative path as part of this function. Also update optionalRoot to rootDir.

@carter-cundiff carter-cundiff force-pushed the 322-default-universal-config-store branch from 602b286 to b9df16c Compare September 16, 2024 19:45
- Update documentation to live under supporting components
- #219 improve manual action message keys
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants