Skip to content
This repository has been archived by the owner on Feb 5, 2021. It is now read-only.

Correctly remove the dynamic replicaset from the pod_name #100

Merged

Conversation

nmohoric
Copy link
Contributor

This should address #78

Copy link
Contributor

@bendrucker bendrucker left a comment

Choose a reason for hiding this comment

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

Hey, this looks great! Added some very minor comments but otherwise the k8s-reverse-engineering logic looks perfect.


def to_hash(pod_template_hash)
# Convert the pod_template_hash to an alphanumeric string using the same
# logic Kubernetes uses at https://github.com/kubernetes/apimachinery/blob/master/pkg/util/rand/rand.go#L119
Copy link
Contributor

Choose a reason for hiding this comment

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

@@ -28,6 +28,31 @@ def is_number?(string)
true if Float(string) rescue false
end

def strip_dynamic_bits(k8s_metadata)
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd recommend def sanitize_pod_name

@nmohoric
Copy link
Contributor Author

nmohoric commented Dec 4, 2018

Thanks for the suggestions, I've updated the PR with the requested changes.

Copy link
Contributor

@bendrucker bendrucker left a comment

Choose a reason for hiding this comment

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

Awesome!

@bendrucker
Copy link
Contributor

Hey @frankreno, this implements the suggestion I made in #78 (comment). Should be good to merge when you have a chance!

Copy link
Contributor

@frankreno frankreno left a comment

Choose a reason for hiding this comment

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

LGTM

@frankreno
Copy link
Contributor

@bendrucker thanks for reviewing!

@nmohoric - Thanks for the PR! I am going to merge, but want to give a couple of more days for the pending PRs I just reviewed as well as submit a PR to upgrade the FluentD Output Plugin. I will add a comment when I cut a new release with the changes, next week sometime.

@frankreno frankreno merged commit d22c75f into SumoLogic:master Dec 6, 2018
@frankreno
Copy link
Contributor

v2.1.0 is out with this change

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants