Posts
How to resolve podfile dependency issues of google_mobile_ads in flutter
There are 27 issues with podfile dependency issues of google_mobile_ads in its repository googleads-mobile-flutter at github Here you can find those issues. My team encountered this issue in the past weeks. Today I had the issue again. To save my time in future, I kept my approach here this time.
Use the following search keywords in cs.github.com
path:pubspec.yaml google_mobile_ads firebase_analytics
locate a good candidate with appropriate version of combinations of the following components.
Posts
conditional compiling in flutter project
In the last week, I intermittently worked on how to compile a flutter project conditionally like the way c/c++ in busy daily work schedules. I knew that flavor is the way to go, however there are still serveral issues opened to explore to make it better or to understand the rationale behind the scene.
Dependency Injections using get_it and injectable: Tree Shaking Capability
Pack only neccessary components into the mobile app:
Posts
Binary Search
Serveral months ago, I practiced serveral binary leetcode questions, and I was confused about the following several things: I didn’t pay much attentions to it then, I thought I will get the hang of it after serveral practices. However after serveral practice, I still confused in binary search problems. Latest week an article mentions binary search at https://leetcode.wang/. Little searching, I found more information about this such as lower bound, upper bound, equal-range, open/close range, middle point etc.
Posts
Shift-lefts in kubernetes with datree
Shift-left is a things nowadays. Recently I read an articles about that beyond testing and security. Today I gave it a try using datree and found that there are still a lot of places to improve in one of my clusters. It is not just a small number. There maybe are many new concepts, configurations and best practicies behind the numbers.
kubectl datree test > test.log rg -n ❌ test.
Posts
Setup k8s monitoring
Kuberneters dashboard doesn’t give enough information about node and cluster information during rececent loading test. I sought to other options. Prometheus and grafana are the de-facto standards. It’s a no-brainer choice. The most important things is how to make them working together.
Setup Prometheus and Grafana kubectl create namespace monitoring helm repo add prometheus-community https://prometheus-community.github.io/helm-charts helm repo update helm install prometheus prometheus-community/prometheus -n monitoring helm repo add grafana https://grafana.github.io/helm-charts helm install grafana grafana/grafana -n monitoring kubectl get secret --namespace monitoring grafana -o jsonpath="{.
Posts
Use cert-manager to secure kubernetes cert-manager behind nginx ingress
Today I had a case to expose serveral kubernetes dashboard with cert-manager. Initiallly I thought it should be quite easy to setup, but the reality was quite different. My intial yaml is as following.
apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: ingress-global-dash namespace: kubernetes-dashboard labels: name: ingress-global-dash use-http01-solver: "true" annotations: cert-manager.io/cluster-issuer: "test-issuer" spec: ingressClassName: nginx rules: - host: "dashboard.example.com" http: paths: - pathType: Prefix path: "/" backend: service: name: kubernetes-dashboard port: number: 80 #later changed to 443 according to port of kubernetes-dashboard svc tls: # < placing a host in the TLS config will determine what ends up in the cert's subjectAltNames - hosts: - dashboard.
Posts
Set timezone in asp.net 6.0 in linux container
According to many articles one the web, the way to set timezone is as following:
cp /usr/share/zoneinfo/Asia/Singapore /etc/localtime echo 'Asia/Singapore' > /etc/timezone You can indeed get the correct time if you run it in dotnet core 5 docker linux containers. However you couldn’t get the correct local time in dotnet 6.0. I found the issue About time incorrect of docker image about aspnet-6 #62545. After I tried serveral combinations mentioned in the issue, finally I got a working solution.
Posts
Reflection on nginx usage
Prologue I never thought I will use nginx extensively in systems I involved after I found that nginx ingress has some limitations comparing to istio in 2021. Nginx is more than reverse proxy or webservers which I thought initially after several months of extensive usage in the past. Here I list serveral advanced use case I countered or discussed with other experts.
CDN MaxCDN use
https://docs.nginx.com/nginx/admin-guide/content-cache/content-caching/
Posts
eksctl Steps
I only noticed the steps after one ergent cancelling of creating. I didn’t find corresponding nodes and wondered what happened. I deleted my cluster and recreated one.
I knew I can create nodegroup after creating cluster and not sure if I can do those sub tasks this way as well. Leave it here for later investigation.
2 sequential tasks: { create cluster control plane "uat-local-intl", 2 sequential sub-tasks: { 4 sequential sub-tasks: { wait for control plane to become ready, associate IAM OIDC provider, 4 parallel sub-tasks: { 2 sequential sub-tasks: { create IAM role for serviceaccount "backend-apps/s3-reader", create serviceaccount "backend-apps/s3-reader", }, 2 sequential sub-tasks: { create IAM role for serviceaccount "backend-apps/cache-access", create serviceaccount "backend-apps/cache-access", }, 2 sequential sub-tasks: { create IAM role for serviceaccount "kube-system/cluster-autoscaler", create serviceaccount "kube-system/cluster-autoscaler", }, 2 sequential sub-tasks: { create IAM role for serviceaccount "kube-system/aws-node", create serviceaccount "kube-system/aws-node", }, }, restart daemonset "kube-system/aws-node", }, create nodegroup "ng-1", } }
Posts
My first usage of jsonnet
In the past I knew jsonnet, however I didn’t commit too much time to learn it until recently I encountered a data driven scenario, generating istio yaml configurations based on an array of data. The scenario is business driven, and I can foresee that there will be more data coming. What a waste of time to repeat the copy/paste procedures with little tweaks. I hated to do that again and again.