marckhouzam

marckhouzam

Solutions architect at the city of Montreal, with a Cloud Native focus. Maintainer of the helm project.

Member Since 11 years ago

Ville de Montreal, Montreal

Experience Points
31
follower
Lessons Completed
2
follow
Lessons Completed
8
stars
Best Reply Awards
51
repos

247 contributions in the last year

Pinned
⚡ Helm plugin that extends the status commands with the status of kubernetes resources
⚡ Define a customized prometheus exporter using YAML
⚡ A set of completion tests for Cobra
⚡ Enhanced sub-command completion in the tcsh shell
⚡ C/C++ Development Tooling (CDT) project repository (cdt)
⚡ Helm plugin to generate an autocompletion script that supports helm2 and helm3 at the same time
Activity
Dec
3
3 days ago
Activity icon
issue

marckhouzam issue helm/helm

marckhouzam
marckhouzam

https://www.smartinsights.com/social-media-marketing/social-media-strategy/new-global-social-media-research/

https://www.smartinsights.com/social-media-marketing/social-media-strategy/new-global-social-media-research/amp/

Dec
2
4 days ago
Activity icon
issue

marckhouzam issue comment spf13/cobra

marckhouzam
marckhouzam

Fix unexpected executing subcommand

I've defined a subcommand with two boolean arguments and found it unexpectedly run into the subcommand. In specific, a subcommand naming "sub" with two boolean arguments "a" and "b". If I parse the command with arguments " --a sub" or "--b sub", it returns an "unknown argument" error as expected. But when I parse the command with arguments "--a --b sub", it unexpectedly runs into the "sub" command with those two boolean arguments set.

I trace down the codes in cobra and find that stripFlags always assume the pattern of flags is'--flag arg' or '-f arg', ignoring the pattern of a boolean flag('--bflag'). So I file a PR trying to fix this unexpected behavior.

marckhouzam
marckhouzam

Thanks @JaySon-Huang! I can reproduce the problem. I haven't looked at the fix yet, but we will need to be very careful not to break anything.

pull request

marckhouzam pull request VilledeMontreal/politique-libre

marckhouzam
marckhouzam

Mise à jour de l'inventaire

Nous avons enlever les solutions internes que nous n'avons toujours pas publier en libre.

Activity icon
created branch
createdAt 3 days ago
open pull request

marckhouzam wants to merge helm/community

marckhouzam
marckhouzam

HIP to include repository URL and tarball digest in release object under chart metadata

Signed-off-by: Luke Reed [email protected]

Opening this HIP after conversation with @mattfarina in this PR comment section: https://github.com/helm/helm/pull/10369

This would help solve this longstanding issue: https://github.com/helm/helm/issues/4256

marckhouzam
marckhouzam
pull request

marckhouzam merge to helm/community

marckhouzam
marckhouzam

HIP to include repository URL and tarball digest in release object under chart metadata

Signed-off-by: Luke Reed [email protected]

Opening this HIP after conversation with @mattfarina in this PR comment section: https://github.com/helm/helm/pull/10369

This would help solve this longstanding issue: https://github.com/helm/helm/issues/4256

marckhouzam
marckhouzam
open pull request

marckhouzam wants to merge helm/community

marckhouzam
marckhouzam

HIP to include repository URL and tarball digest in release object under chart metadata

Signed-off-by: Luke Reed [email protected]

Opening this HIP after conversation with @mattfarina in this PR comment section: https://github.com/helm/helm/pull/10369

This would help solve this longstanding issue: https://github.com/helm/helm/issues/4256

marckhouzam
marckhouzam

What will be done for an installation done from a local filesystem directory?

open pull request

marckhouzam wants to merge helm/community

marckhouzam
marckhouzam

HIP to include repository URL and tarball digest in release object under chart metadata

Signed-off-by: Luke Reed [email protected]

Opening this HIP after conversation with @mattfarina in this PR comment section: https://github.com/helm/helm/pull/10369

This would help solve this longstanding issue: https://github.com/helm/helm/issues/4256

marckhouzam
marckhouzam

How would this information be accessed? Is it meant to be easily accessible by users? Is it sufficient to add it to the metadata and leave it up to users to figure out how to access it using kubectl or some other means?

open pull request

marckhouzam wants to merge helm/community

marckhouzam
marckhouzam

HIP to include repository URL and tarball digest in release object under chart metadata

Signed-off-by: Luke Reed [email protected]

Opening this HIP after conversation with @mattfarina in this PR comment section: https://github.com/helm/helm/pull/10369

This would help solve this longstanding issue: https://github.com/helm/helm/issues/4256

marckhouzam
marckhouzam

Sentence needs fixing: "and can then that storage location can populate the Metadata"

open pull request

marckhouzam wants to merge helm/community

marckhouzam
marckhouzam

HIP to include repository URL and tarball digest in release object under chart metadata

Signed-off-by: Luke Reed [email protected]

Opening this HIP after conversation with @mattfarina in this PR comment section: https://github.com/helm/helm/pull/10369

This would help solve this longstanding issue: https://github.com/helm/helm/issues/4256

marckhouzam
marckhouzam

If it is decided not to store a private URL by default, we should add a flag to allow it.

open pull request

marckhouzam wants to merge helm/community

marckhouzam
marckhouzam

HIP to include repository URL and tarball digest in release object under chart metadata

Signed-off-by: Luke Reed [email protected]

Opening this HIP after conversation with @mattfarina in this PR comment section: https://github.com/helm/helm/pull/10369

This would help solve this longstanding issue: https://github.com/helm/helm/issues/4256

marckhouzam
marckhouzam

Extra "to" in "tooling to that provides"

open pull request

marckhouzam wants to merge helm/community

marckhouzam
marckhouzam

HIP to include repository URL and tarball digest in release object under chart metadata

Signed-off-by: Luke Reed [email protected]

Opening this HIP after conversation with @mattfarina in this PR comment section: https://github.com/helm/helm/pull/10369

This would help solve this longstanding issue: https://github.com/helm/helm/issues/4256

marckhouzam
marckhouzam

Extra "is" in "know what the repository URL is that was used"

pull request

marckhouzam merge to helm/community

marckhouzam
marckhouzam

HIP to include repository URL and tarball digest in release object under chart metadata

Signed-off-by: Luke Reed [email protected]

Opening this HIP after conversation with @mattfarina in this PR comment section: https://github.com/helm/helm/pull/10369

This would help solve this longstanding issue: https://github.com/helm/helm/issues/4256

marckhouzam
marckhouzam
Activity icon
issue

marckhouzam issue comment kubernetes/kubernetes

marckhouzam
marckhouzam

Framework for shell completion for plugins (phase 1)

What type of PR is this?

/kind feature /sig cli

What this PR does / why we need it:

This PR does two things: 1- includes plugin names during kubectl shell completion (cherry-pick of @superbrothers's commit from #76561) 2- allows a plugin to provide completions through an executable script named kubectl_complete-<pluginName> present on $PATH

Which issue(s) this PR fixes:

Fixes #74178

Special notes for your reviewer:

This is still a draft in hopes of getting feedback from the community. It does not include tests and probably needs some cleaning up.

When doing completion for arguments or flags for a plugin, kubectl will call kubectl_complete-<plugin> to obtain the list of completions. For example, for the krew plugin, when the user triggers completion by doing:

kubectl krew <TAB>

kubectl will look on $PATH for an executable file called kubectl_complete-krew. This file should print the list of valid completions for the plugin to stdout. kubectl will then present these completion choices to the user. This approach is the one used by the Helm project for its plugins: https://helm.sh/docs/topics/plugins/#dynamic-completion

How to test

For zsh (but very similar for bash, fish or powershell).

We need a plugin to provide completion through a new kubectl_complete-<pluginName> file. Let's create one ourselves. Let's do it for the krew plugin, which I assume many in the community have installed. Since krew uses Cobra, it has the __complete command, which makes it very easy to obtain completions, as will become clear below:

cat <<EOF >kubectl_complete-krew
#!/usr/bin/env sh

# Call the __complete command passing it all arguments
kubectl krew __complete "\[email protected]"
EOF

chmod u+x kubectl_complete-krew

Please put the kubectl_complete-krew file somewhere on your $PATH. Then:

cd $GOPATH/src/k8s.io/kubernetes
go build -o /tmp/kubectl ./cmd/kubectl
source <(/tmp/kubectl completion zsh)

/tmp/kubectl <TAB>
# Notice that plugins are now listed as options

/tmp/kubectl krew <TAB>
# Notice that krew sub-commands are now listed

NOTE: Flag completion for plugins currently does not work due to a bug in Cobra which is expected to be fixed in Cobra's next release. Please refer to: https://github.com/spf13/cobra/pull/1161

Phase 2

Although this solution can be sufficient to fully support shell completion for kubectl plugins, I think we could go further and make things easier. I propose implementing a phase 2, also based on Helm's solution, which would allow a plugin to specify all its flags and commands in a yaml file that will be consumed by kubectl to provide shell completion. Such an approach makes it much easier for plugin developers to provide the fundamental part of the plugin's shell completion. This solution is documented by Helm here: https://helm.sh/docs/topics/plugins/#static-auto-completion

Does this PR introduce a user-facing change?

Shell completion will now show plugin names when appropriate.  Furthermore, shell completion will work for plugins that provide such support.
marckhouzam
marckhouzam

@marckhouzam How to use __complete command to get a list that gets suggested to me when I hit {Tab} after typing kubectl get ? It suggests a list of existing types of resources in the cluster. I need to know that so that I could write a simple bash script for exporting/backuping data from specific namespace.

@Drugoy You can use kubectl api-resources -o name to get a list of resources in the cluster.

open pull request

marckhouzam wants to merge spf13/cobra

marckhouzam
marckhouzam

Add MAINTAINERS file

This PR suggests adding a MAINTAINERS file to help the community know who they can turn to, but also give credit to the maintainers for all their hard work.

That being said, I've only included maintainers that I can remember merged something in the last few years, but there must be more. I also added an emeritus section that is currently empty and I don't know if it even applies.

If there is interest such a change, please let me know the list of maintainers and I'll update the PR.

marckhouzam
marckhouzam

Exactly right for "emeritus". I also think that an "inactive" section may be of value for Cobra. But wanted to see how the maintainers felt about this whole PR before adding another level. Thanks for bringing it up though.

pull request

marckhouzam merge to spf13/cobra

marckhouzam
marckhouzam

Add MAINTAINERS file

This PR suggests adding a MAINTAINERS file to help the community know who they can turn to, but also give credit to the maintainers for all their hard work.

That being said, I've only included maintainers that I can remember merged something in the last few years, but there must be more. I also added an emeritus section that is currently empty and I don't know if it even applies.

If there is interest such a change, please let me know the list of maintainers and I'll update the PR.

Activity icon
issue

marckhouzam issue comment spf13/cobra

marckhouzam
marckhouzam

Add OWNERS file

This PR suggests adding an OWNERS file to help the community know who they can turn to, but also give credit to the maintainers for all their hard work.

That being said, I've only included maintainers that I can remember merged something in the last few years, but there must be more. I also added an emeritus section that is currently empty and I don't know if it even applies.

If there is interest such a change, please let me know the list of maintainers and I'll update the PR.

marckhouzam
marckhouzam

According to #959, other people with write access are: @bogem, @broady, @bep.

Thanks! Added.

open pull request

marckhouzam wants to merge spf13/cobra

marckhouzam
marckhouzam

Add OWNERS file

This PR suggests adding an OWNERS file to help the community know who they can turn to, but also give credit to the maintainers for all their hard work.

That being said, I've only included maintainers that I can remember merged something in the last few years, but there must be more. I also added an emeritus section that is currently empty and I don't know if it even applies.

If there is interest such a change, please let me know the list of maintainers and I'll update the PR.

pull request

marckhouzam merge to spf13/cobra

marckhouzam
marckhouzam

Add OWNERS file

This PR suggests adding an OWNERS file to help the community know who they can turn to, but also give credit to the maintainers for all their hard work.

That being said, I've only included maintainers that I can remember merged something in the last few years, but there must be more. I also added an emeritus section that is currently empty and I don't know if it even applies.

If there is interest such a change, please let me know the list of maintainers and I'll update the PR.

push

marckhouzam push VilledeMontreal/cobra

marckhouzam
marckhouzam

Add MAINTAINERS file

This should help the community know who they can turn to, but also give credit to the maintainers for all their hard work.

Signed-off-by: Marc Khouzam [email protected]

commit sha: 305a2c9341ab2ab6ec1b8a9b699837d2347d7fb2

push time in 3 days ago
Dec
1
5 days ago
pull request

marckhouzam pull request spf13/cobra

marckhouzam
marckhouzam

Add backwards-compatibility tests for legacyArgs()

As suggested by @umarcor, these tests make sure we don't break backwards-compatibility with respect to the current behaviour of legacyArgs().

See #1500 which would break the current behaviour of legacyArgs().

Activity icon
created branch

marckhouzam in VilledeMontreal/cobra create branch feat/testBackcomp

createdAt 4 days ago
Activity icon
issue

marckhouzam issue comment kubernetes/kubernetes

marckhouzam
marckhouzam

bash completion for `kubectl exec POD -c`

What would you like to be added:

Bash-completion for kubectl exec POD -c into a specific container. Actually, choosing the container with bash_completion works with kubectl logs, but not with exec.

Let's make an example:

# kubectl -n build-storage get po
NAME             READY   STATUS    RESTARTS   AGE
static-sites-0   2/2     Running   0          4d
# k -n build-storage logs static-sites-0  [TAB-TAB]
http  ssh   

BUT

kubectl -n build-storage exec -ti static-sites-0 -c [TAB-TAB] static-sites-0 static-sites-0 static-sites-0 static-sites-0`

Why is this needed:

Because it is missing :)

marckhouzam
marckhouzam
Activity icon
issue

marckhouzam issue comment kubernetes/kubernetes

marckhouzam
marckhouzam

Add completion for `kubectl config set-context`

What type of PR is this?

/kind feature

What this PR does / why we need it:

Add completion for kubectl config set-context

Which issue(s) this PR fixes:

Fixes #106738

Special notes for your reviewer:

Does this PR introduce a user-facing change?

Add completion for `kubectl config set-context`.

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


marckhouzam
marckhouzam

I agree such completion would help users modify an existing context. However from my understanding kubectl config set-context does not limit itself to existing contexts but accepts new context names as well.

I wonder if having completion of existing context may mislead users in what this command supports? But in truth I'm still leaning towards your solution, I just wanted to mention this little point in case someone had a suggestion.

pull request

marckhouzam pull request kubernetes/kubernetes

marckhouzam
marckhouzam

Add completion for container list for 'exec'

What type of PR is this?

/kind feature /sig cli

What this PR does / why we need it:

This PR teaches the 'kubectl exec' command how to complete its --container/-c flag using container names.

Which issue(s) this PR fixes:

Fixes #94927

Special notes for your reviewer:

I wasn't able to register the new completion function in the cmdutil.AddContainerVarFlags() function where the flag is actually created because of a circular dependency between packages.

Does this PR introduce a user-facing change?

kubectl now provides shell completion for container names following the --container/-c flag of the exec command.
push

marckhouzam push VilledeMontreal/kubernetes

marckhouzam
marckhouzam

apf: include seat information in request dump

marckhouzam
marckhouzam

Free APF seats for watches handled by an aggregated apiserver.

marckhouzam
marckhouzam
marckhouzam
marckhouzam

Update the binary version file for NPD to 0.8.10-gke0.1

marckhouzam
marckhouzam

Refactor to use structure to pass parameters

marckhouzam
marckhouzam

Add log for creating node shutdown manager

marckhouzam
marckhouzam

node: e2e: clarify findKubeletService

Add docstrings to findKubeletService and restartKubelet, fix typos along the way. xref: https://github.com/kubernetes/kubernetes/pull/105516#pullrequestreview-780230582

Signed-off-by: Francesco Romani [email protected]

marckhouzam
marckhouzam

remove format pods func, instead with klog.Kobjs

marckhouzam
marckhouzam
marckhouzam
marckhouzam

Lock StorageObjectInUseProtection feature gate to default

Signed-off-by: Konstantin Misyutin [email protected]

marckhouzam
marckhouzam

Remove tests when StorageObjectInUseProtection feature is disabled

As well as feature gate are locked, the tests when this feature is disabled will crash. So we should remove them together with locking the feature.

Signed-off-by: Konstantin Misyutin [email protected]

marckhouzam
marckhouzam

remove scheduler ServiceAffinity plugin

Signed-off-by: kerthcet [email protected]

marckhouzam
marckhouzam

Graduate JobTrackingWithFinalizers to beta

Enable feature by default.

Update integration tests for other features to assume that finalizers are present.

Change-Id: Ie969344f572627dba882c0e862e5700dadaf3026

marckhouzam
marckhouzam

Add missing json tag on internal unstructured list

marckhouzam
marckhouzam
marckhouzam
marckhouzam

Test json/yaml decoding type coercion

marckhouzam
marckhouzam

allow for passing a custom handler to the empty delegate

marckhouzam
marckhouzam

Merge pull request #105688 from mcshooter/updateNPD0810

Update the binary version file for NPD to 0.8.10-gke0.1

marckhouzam
marckhouzam

Merge pull request #105702 from liggitt/json-strict-test

JSON decoder fixup

marckhouzam
marckhouzam

Merge pull request #105674 from tkashem/apf-debug

apf: include seat information in per request debug dump

commit sha: c11d9eb3ef19eace85f6e04cd7350630ba7737dc

push time in 5 days ago
pull request

marckhouzam pull request spf13/cobra

marckhouzam
marckhouzam

Add OWNERS file

This PR suggests adding an OWNERS file to help the community know who they can turn to, but also give credit to the maintainers for all their hard work.

That being said, I've only included maintainers that I can remember merged something in the last few years, but there must be more. I also added an emeritus section that is currently empty and I don't know if it even applies.

If there is interest such a change, please let me know the list of maintainers and I'll update the PR.

push

marckhouzam push VilledeMontreal/cobra

marckhouzam
marckhouzam

Add OWNERS file

This should help the community know who they can turn to, but also give credit to the maintainers for all their hard work.

Signed-off-by: Marc Khouzam [email protected]

commit sha: 1f56e9f7a77f115f00873dc1a6f85df4feae868a

push time in 5 days ago
Nov
30
6 days ago
Activity icon
created branch

marckhouzam in VilledeMontreal/cobra create branch feat/owners

createdAt 5 days ago
Previous