Skip to content

Instantly share code, notes, and snippets.

View michelleN's full-sized avatar

Michelle Dhanani michelleN

View GitHub Profile
@michelleN
michelleN / gist:2be48cff05b29fa50ce8a3c44c657e2b
Last active January 10, 2024 02:37
working with container registries
github container registry:
- doc: https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry
- private by default
dockerhub notes:
- can only have one private image. in settings, can specify if by default repo should be private or public
@michelleN
michelleN / printstruct
Created August 24, 2021 14:16
print go struct
func prettyPrint(i interface{}) string {
s, _ := json.MarshalIndent(i, "", "\t")
return string(s)
}
https://stackoverflow.com/questions/24512112/how-to-print-struct-variables-in-console
@michelleN
michelleN / hung-termination.md
Created April 24, 2020 20:44
namespace stuck in termination stage

Sometimes caused by apiservices running that no longer have backends. Confirm via kubectl:

$ k api-resources
error: unable to retrieve the complete list of server APIs: tap.linkerd.io/v1alpha1: the server is currently unable to handle the request

Solution is to delete relevant apiservice that no longer has backends: helm/helm#6361 (comment)

https://github.com/open-policy-agent/gatekeeper/blob/master/chart/gatekeeper-operator/generate_helm_template.sh
Ryan is someone at a company who is using Kubernetes and Azure. Have some legacy stuff but transitioning most services on to AKS.
Questions he asked:
- Should I check in draft artifacts (charts, Dockerfile, draft.toml)?
Personally, I check in the Dockerfile, draft.toml, and the charts so that developers have access to it if they need it. We can in the future make the location of the charts within the git repository configurable so that if we want to hide it somewhere else we should be able to.
- Do I use draft in my CI/CD pipeline?
-- No. You should only be re-building the docker image and pushing it the container registry and then using that image with a production chart for your app which lives in a chart repository for your org.
-- You _can_ use it in your CI for testing though. That makes sense.
- What kind of patterns do I follow to be able to use generic charts? Chart for every type of app? Generic chart for all web apps? How do I use values files?
@michelleN
michelleN / remote-dev.txt
Last active April 4, 2018 21:55
thoughts on remote work
Thoughts on working from home vs office and what to look for in a new job and younger in the industry for Matt Farina's friend
I've had experience working in 4 different offices as an engineer and I've also had a year and a half of experience working as a remove developer in a different state than everyone on my team. Currently, my whole team is remote.
On being at an office:
- At most of my jobs, I've had planned lunches with technical presentations. Because I was at a point where I took every second to learn as much as I could (especially starting out), I really enjoyed those learning opportunities.
- It was also nice to be able to grab coffee with co-workers or have impromptu meetings with folks higher up in the ladder than me or folks in a different part of the business. I also liked being able to build relationships in person. This will always be important in your career but it was especially fruitful for me early on. I learned a lot and people gave me particular opportunities because they knew my str
@michelleN
michelleN / draft-dev.md
Last active August 15, 2017 16:41
developing against draft

When dev'ing local with minkube: In one terminal window:

$ helm init
$ tiller_deploy=$(kubectl get po -n kube-system -o go-template --template '{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}' | grep "tiller")
$ kubectl port-forward $tiller_deploy 44134:44134 -n kube-system

In another terminal window:

----------------------------------
helm [helm-update*]$ brew
Example usage:
brew (info|home|options) [FORMULA...]
brew install FORMULA...
brew uninstall FORMULA...
brew search [TEXT|/PATTERN/]
brew list [FORMULA...]
brew update
brew upgrade [FORMULA...]
@michelleN
michelleN / kubernetes-charts-cache.yaml
Last active May 6, 2016 20:15
example of cache file
This is what a cache file will look like:
Under the name-version key, we'll specificy a url to actually download the chart,
a created timestamp, a removed boolean field, and a dump of the Chart.yaml file which includes the keywords.
You can use the keywords and the name fields for the search command.
Cache files are currently located under HELM_HOME/cache and named in the repoName-cache.yaml format.
FYI: The directory structure under helm home will change so that the directory is safe for people who are migrating
from the old helm tool. The new structure will look like this HELM_HOME/repository/cache/ (I'm moving all of
the stuff in HELM_HOME currently under a directory called `repository`.)
@michelleN
michelleN / dm-testing.md
Last active February 1, 2016 16:42
DM Testing Workflow

Workflow for testing image changes:

  1. Make local changes

  2. Run make info to see what PROJECT you’re pointing to (and other env variables). Set as needed.

  3. To use gcr, run gcloud auth login to generate access token which you can see at gcloud auth print-access-token

  4. Run docker login -e michelle@deis.com -u _token -p “$(gcloud auth print-access-token)” https://gcr.io (This will let you push images to gcr.)