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

feat: access logs update for proxy-defaults CRD #1816

Merged
merged 1 commit into from
Dec 21, 2022

Conversation

DanStough
Copy link
Contributor

@DanStough DanStough commented Dec 21, 2022

Changes proposed in this PR:

How I've tested this PR:

  • Unit Tests

How I expect reviewers to test this PR:

  • Unit tests are about as good as it gets; the PR to merge this functionality into Consul is still open.

Checklist:

  • Tests added
  • CHANGELOG entry added

    HashiCorp engineers only, community PRs should not add a changelog entry.
    Entries should use present tense (e.g. Add support for...)

@DanStough DanStough requested review from thisisnotashwin, a team, curtbushko and freddygv and removed request for a team and freddygv December 21, 2022 16:58
@DanStough DanStough force-pushed the dans/NET-1753/envoy-access-logs branch from 09cd8f0 to f073484 Compare December 21, 2022 17:04
Copy link
Contributor

@thisisnotashwin thisisnotashwin left a comment

Choose a reason for hiding this comment

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

🙏 excellent!

@@ -10,7 +10,7 @@ require (
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510
github.com/hashicorp/consul-k8s/control-plane/cni v0.0.0-20220831174802-b8af65262de8
github.com/hashicorp/consul-server-connection-manager v0.1.0
github.com/hashicorp/consul/api v1.18.0
github.com/hashicorp/consul/api v1.10.1-0.20221220195433-629878a6879c
Copy link
Contributor

Choose a reason for hiding this comment

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

we should look into this sometime in the future because it is awfully confusing that the API module version is 1.10.*.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hard agree that it's messy. If I understand how the pseudo-version is created, it's because the last semver tag on Consul main for api module was api/1.10.0. You can tell it's a holiday week because I made a shell snippet to verify:

git tag -l 'api/*' | while read tag
do
    echo Tag is $tag
    commit=$(git rev-list -n 1 $tag)
    echo Commit is $commit
    if git merge-base --is-ancestor $commit HEAD; then
        echo "Yes"
    else
        echo "No"
    fi
    echo ""
done

All this to say, I'm not sure I have no idea how to fix it 😬 .

control-plane/api/v1alpha1/proxydefaults_types_test.go Outdated Show resolved Hide resolved
@@ -75,6 +75,8 @@ type ProxyDefaultsSpec struct {
MeshGateway MeshGateway `json:"meshGateway,omitempty"`
// Expose controls the default expose path configuration for Envoy.
Expose Expose `json:"expose,omitempty"`
// AccessLogs controls all envoy instances' access logging configuration.
AccessLogs *AccessLogs `json:"accessLogs,omitempty"`
}

func (in *ProxyDefaults) GetObjectMeta() metav1.ObjectMeta {
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: public method should have comment (I know you didn't create this)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Looks like the ConfigEntryResource interface has a comment for this. I don't see comments in other implementations, so I'll probably pass on updating this round.

@DanStough DanStough force-pushed the dans/NET-1753/envoy-access-logs branch from f073484 to 8142f57 Compare December 21, 2022 19:55
@DanStough DanStough merged commit 21d3b04 into main Dec 21, 2022
@DanStough DanStough deleted the dans/NET-1753/envoy-access-logs branch December 21, 2022 21:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants