profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/karlkfi/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.
Karl Isenberg karlkfi @GoogleCloudPlatform San Francisco, CA https://medium.com/@karlkfi Anthos Solutions Architect at Google. Previously: Cruise, Mesosphere, Pivotal.

karlkfi/inject 81

Dependency injection library for Go (golang)

karlkfi/concourse-dcind 46

Docker in Docker container optimized for use with Concourse CI

GoogleCloudPlatform/anthos-config-management-samples 18

Code samples for Anthos Config Management

karlkfi/dcos-vagrant-ansible 6

DC/OS cluster provisioning with Vagrant & Ansible

karlkfi/kubectl-curl 5

kubectl plugin to curl the Kubernetes API with your current KUBECONFIG context

karlkfi/inject-example-server 3

Example web server with dependency injected controllers

karlkfi/aws-cli 2

Containerized AWS CLI on alpine to avoid requiring the aws cli to be installed on CI machines.

karlkfi/dind 2

Docker in Docker

karlkfi/jwt-encoder 2

Generates a JWT token from a user ID and private key file.

pull request commentkubernetes-sigs/cli-utils

Add apply-time-mutation feature

This is ready to review again.

The biggest outstanding question, IMO, is the ResourceReference syntax.

  1. Should it exactly match ObjMetadata, without the option for apiVersion? This might make it hard to set the value with a kpt setter, which doesn't allow for processing the user's input value.
  2. Should it use group or apiGroup? There are competing precedents in Kubernetes.

Prior Art:

karlkfi

comment created time in 2 days

push eventkarlkfi/cli-utils

Karl Isenberg

commit sha 4fee08f0e5c198fb0966a34ee0780cf18cbd014d

Revert duplicate NoopClusterReader

view details

push time in 2 days

Pull request review commentkubernetes-sigs/cli-utils

[WIP] Add apply-time-mutation feature

 import ( 	"k8s.io/apimachinery/pkg/runtime/schema" 	"sigs.k8s.io/cli-utils/pkg/kstatus/polling/engine" 	"sigs.k8s.io/cli-utils/pkg/kstatus/polling/event"-	"sigs.k8s.io/cli-utils/pkg/kstatus/polling/testutil" 	"sigs.k8s.io/cli-utils/pkg/object"+	"sigs.k8s.io/cli-utils/pkg/testutil"

fixed.

karlkfi

comment created time in 2 days

PullRequestReviewEvent

push eventkarlkfi/cli-utils

Karl Isenberg

commit sha 966eb7a1bc310571136309b4c36d68c77beae675

Revert AddDependsOn refactor

view details

push time in 2 days

push eventkarlkfi/cli-utils

Karl Isenberg

commit sha 83619b76d54101182def11cc2b8ac6d4986c5ce1

Remove unused event operation: Mutated

view details

push time in 2 days

push eventkarlkfi/cli-utils

Karl Isenberg

commit sha da1775dbf03bef654a04083821040a4ce6af2a42

Revert refactor to filtering that broke tests

view details

push time in 2 days

push eventkarlkfi/cli-utils

Karl Isenberg

commit sha eb774d641ff1f3caab8ce4012713d82f1e743e53

Remove kyq and logutil (unused)

view details

push time in 2 days

pull request commentkubernetes-sigs/cli-utils

[WIP] Add apply-time-mutation feature

One benefit of using ajson over yq is that ajson doesn't use any logging library (except in the main.go, which we aren't using). So this means I can drop the logtuil for translation.

karlkfi

comment created time in 2 days

pull request commentkubernetes-sigs/cli-utils

[WIP] Add apply-time-mutation feature

Alright, the general consensus talking to stakeholders seems to be that everyone expects JSONPath, even if no one can really justify why JSONPath is better than yq.

So following the principal of least surprise, I've refactored this to use https://github.com/spyzhov/ajson as the expression language, because that's the only existing Go JSONPath lib that supports both retrieval and mutation.

The one significant downside of this approach is that ajson does not auto-generate intermediate arrays/maps when setting a value. So the value needs to exist in the input object before it can be mutated. I've filed a feature request for that: https://github.com/spyzhov/ajson/issues/35

karlkfi

comment created time in 2 days

push eventkarlkfi/cli-utils

Karl Isenberg

commit sha 6992b74beb7dbc833042258231394f05a535bb82

Add more robust event list testing in e2e tests - Add testutil.Equal to show comparisons with cmp.Diff output - Add github.com/google/go-cmp for cmp.Equal and cmp.Diff These comparison tools make debugging easier and properly handle error comparisons, using cmpopts.EquateErrors() - Added EventsToExpEvents, EventToExpEvent, and RemoveEqualEvents to testutil to help with comparing event lists - Add InitEvent to ExpEvent, to enable validating it exists - e2e tests have all been upgraded to validate a full list of events, rather than just a partial list with partial contents. This should increase confidence that new changes don't break things.

view details

Karl Isenberg

commit sha 1b9059b640eba06b654765ded2c17171a7eaf3c4

Fix apply and destroy e2e test to share inventory

view details

Kubernetes Prow Robot

commit sha 206bd1c2179aa4183b1ab7b54cce84bc27065c12

Merge pull request #405 from karlkfi/karl-e2e-events Add more robust event list testing in e2e tests

view details

Karl Isenberg

commit sha c7e2b9b427a5a074f2c9e77bedb584ea5f3b85ee

Add apply-time-mutation

view details

Karl Isenberg

commit sha d47f05777ed248cd66dde00aa79e294fd153430d

switch to jsonpath

view details

push time in 2 days

create barnchkarlkfi/cli-utils

branch : karl-apply-time-mutation-yq

created branch time in 2 days

issue openedspyzhov/ajson

Enhanced support for updating json using jsonpath

This is an interesitng project! It seems like it's the only jsonpath library that supports mutation and not just retrieval. That said, the mutation API/behavior could be improved.

I'd like to be able to mutate json using jsonpath. This leads to two asks:

  1. I'd also like to be able to pass an interface{} to a Node.Set function and have it handle conversion to the right type, erroring if the type is invalid. I think this just means exporting the internal update method: https://github.com/spyzhov/ajson/blob/master/node_mutations.go#L147
  2. If the node exists, ajson makes mutation easy by supporting Set fields on Node. However, if there's no match, because the node or it's parents don't exist, I'd like to be able to easily auto-generate the node and any parent maps & arrays to match the jsonpath expression.

created time in 3 days

delete branch karlkfi/cli-utils

delete branch : karl-e2e-events

delete time in 3 days

pull request commentkubernetes-sigs/cli-utils

Add more robust event list testing in e2e tests

I fixed the DeleteSkipped test bug. Thanks @mortent for tracking down the cause!

karlkfi

comment created time in 3 days

push eventkarlkfi/cli-utils

Karl Isenberg

commit sha 1b9059b640eba06b654765ded2c17171a7eaf3c4

Fix apply and destroy e2e test to share inventory

view details

push time in 3 days

pull request commentkubernetes-sigs/cli-utils

[WIP] Add apply-time-mutation feature

I've gone back and reverted a bunch of the minor refactors that are in other PRs or aren't critical to the functionality.

karlkfi

comment created time in 4 days

Pull request review commentkubernetes-sigs/cli-utils

[WIP] Add apply-time-mutation feature

 import ( 	"k8s.io/apimachinery/pkg/runtime/schema" 	"sigs.k8s.io/cli-utils/pkg/kstatus/polling/engine" 	"sigs.k8s.io/cli-utils/pkg/kstatus/polling/event"-	"sigs.k8s.io/cli-utils/pkg/kstatus/polling/testutil" 	"sigs.k8s.io/cli-utils/pkg/object"+	"sigs.k8s.io/cli-utils/pkg/testutil"

this should be outdated... the commit is gone. not sure what happened to github that it thinks this is current...

karlkfi

comment created time in 4 days

PullRequestReviewEvent

Pull request review commentkubernetes-sigs/cli-utils

[WIP] Add apply-time-mutation feature

 import ( 	"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" 	"k8s.io/apimachinery/pkg/runtime/schema" 	"sigs.k8s.io/cli-utils/pkg/kstatus/polling/event"-	"sigs.k8s.io/cli-utils/pkg/kstatus/polling/testutil" 	"sigs.k8s.io/cli-utils/pkg/kstatus/status" 	"sigs.k8s.io/cli-utils/pkg/object"-	fakemapper "sigs.k8s.io/cli-utils/pkg/testutil"+	"sigs.k8s.io/cli-utils/pkg/testutil"

reverted

karlkfi

comment created time in 4 days

PullRequestReviewEvent

push eventkarlkfi/cli-utils

Karl Isenberg

commit sha 2dc16525fd17506064c16ac0fd84196ea521f4f3

Add apply-time-mutation

view details

push time in 4 days

Pull request review commentkubernetes-sigs/cli-utils

[WIP] Add apply-time-mutation feature

 func (cde CyclicDependencyError) Error() string { 	} 	return errorBuf.String() }++// EdgeSet is a list wrapper that allows set equality comparison.

removed. I thought this would be a nice clean way to more efficiently compare edges using sorting, but it was just a nice to have. I've removed it to reduce the size of this PR.

karlkfi

comment created time in 4 days

PullRequestReviewEvent

Pull request review commentkubernetes-sigs/cli-utils

[WIP] Add apply-time-mutation feature

+// Copyright 2021 The Kubernetes Authors.

done

karlkfi

comment created time in 4 days

PullRequestReviewEvent

Pull request review commentkubernetes-sigs/cli-utils

[WIP] Add apply-time-mutation feature

+// Copyright 2020 The Kubernetes Authors.

I refactored this to not use a mutex and only be used by the mutator. Is that ok?

karlkfi

comment created time in 4 days

PullRequestReviewEvent

Pull request review commentkubernetes-sigs/cli-utils

[WIP] Add apply-time-mutation feature

+// Copyright 2021 The Kubernetes Authors.

done

karlkfi

comment created time in 4 days

PullRequestReviewEvent