-
Notifications
You must be signed in to change notification settings - Fork 9
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
Conversation
carter-cundiff
commented
Sep 12, 2024
- Update documentation to live under supporting components
d500e5d
to
1a87b9b
Compare
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 |
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.
S: Again I think we can largely lean on Krausening docs here and only call out the aiSSEMBLE-specific stuff.
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.
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 |
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.
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").
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.
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.
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.
Brought up to higher level by removing kubernetes specific wording.
[source,yaml] | ||
---- | ||
env: | ||
BASE_PROPERTY: <URI housing base property configurations> |
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.
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.
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.
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?
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.
Moved technical portion to helm chart README
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.
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: |
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.
?: 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.
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.
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 |
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.
A: If the existing text remains I would reword to "...a PV will meet the needs of most projects and is the..."
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.
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 |
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.
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> |
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.
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 |
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.
A: missing apostrophe - project's
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.
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 |
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.
A: Should this be Kubernetes Resource Injection to match what we called it above?
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.
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. |
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.
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.
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.
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 |
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.
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 |
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.
Not sure if we're capitalizing "Configuration Store". I'm fine with either, but Helm should be capitalized.
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.
Capitalized all helms and config stores
670a005
to
262272f
Compare
e3bef9d
to
602b286
Compare
@@ -1,10 +0,0 @@ | |||
# Default values for aissemble-jenkins. |
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: 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 |
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: Moved content to antora docs
@@ -21,7 +21,6 @@ aissemble-configuration-store-chart: | |||
supplementalVolumeMounts: | |||
- name: configurations | |||
mountPath: "/configurations" | |||
readOnly: 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.
q/s: do we not we want to keep the original PVC as read only?
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.
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)); |
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.
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
.)
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.
Update to set key with relative path as part of this function. Also update optionalRoot
to rootDir
.
602b286
to
b9df16c
Compare
- Update documentation to live under supporting components - #219 improve manual action message keys
b9df16c
to
fc659a9
Compare