feat(identifier): identify s2i built application and eap operator-managed pods#2
Merged
Conversation
…aged pods - Use image metadata to identify s2i built applications - Use 'managed-by: eap-operator' to identify EAP operator managed pods
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Made using Bob 1.0.2
This PR adds new functionality to the identifier, to find:
s2i built pods:
The problem here is that if you use the EAP builder image to deploy your application, then the resulting pod won't always have the proper labels required to monitor. As a POC, we can read the image metadata to find mentions of EAP environment variables, and if present, label our pods. This requires a new rbac permission on
imagesresource. This seems to be working well in the simple case; I've used EAP 8 to deploy a hello-world EAP application and the resulting pod gets labelled withrht.comp=EAPeach time.EAP Operator-managed pods:
If applications are deployed using the EAP operator, then the resulting pod seems to have the labels we need. To be extra safe though, we've added a check on the
managed-by: eap-operatorlabel to sniff out pods that are managed by EAP. This way we can track them in-case theirrht.complabel gets removed somehow, and lets us add our timestamp label and image & image version labels.