Posts
Reduce the chance of resource conflict in gitops
Summary: Reduce the chance of resource conflict in gitops by reducing the time window of using shared resource files
My initial journal with gitops was setup my gitops cicd pipeline following the flux tutorial way. I immediately found out the limitation of flux at that time and sought alternative solutions. After comparing different solutions, I settled down argo-cd.
After a short while usage of argo-cd, I moved configration yamls and kustomization.
Posts
Playbook: etcd debugging
etcd debugging flowchart, copy the flowchat from “Stories from the Playbook” for easy reference and put here to make it searchable in my site.
flowchart TD oversized{MVCC DB oversized}--|Yes|logIntoContainer(log into container) logIntoContainer -- checkSize(check size of db) checkSize -- compatOrDefrag(compat or defrag) compatOrDefrag -- resizeDisk(resize machine disk) resizeDisk -- triggerRepair(Trigger repair) triggerRepair -- END oversized --|No|crashLoop{crash looping} crashLoop --|Yes| moreTime2Init(allow etc more time to init) moreTime2Init -- upgradeVersion(upgrade version) upgradeVersion -- resizeDisk crashLoop --|No| leaderElectionIssue{Leader Election Issue?
Posts
Lessons learnt after two years usage of cert-manager
Yesterday I spent one or two hours to resolve a pending order issue. I encountered the issue before when I configured cert-manager with ACME. However after a short while detour to flutter(ios,android) development, I couldn’t quickly locate the root causes. This made me think that it is better off to note down the lessons I leant here.
DNS01 vs HTTP01 HTTP01 is quite easy to setup for one domain name.
Posts
working solution: locale change using device_preview and GetMaterialApp.router
I can make it works when using device_preview and getx GetMaterialApp. GetMaterialApp can perfectly works with device_preview on many things such as size, orientation etc. GetMaterialApp.router is not the case. I found that locale changes in device_preview can’t propagate to GetMaterialApp.router.
I raised a issue, however getx has a bad reputation on fixing issues. I can’t wait so long and I sought other options. Things I tried was to use GetMaterialApp, however always to get several errors.
Posts
Terraform advantages over cloudformation or ARM tempaltes
Terraform site gives several use cases and comparison with other IaC langauges. I think there are few things of terraform that stand out when comparing it with other tools such as cloudformation, ARM tempaltes IaC languages.
multi-cloud deployment When you only use one cloud-provider’s solution to do IaC and things get in your way, you will have hard time to migrate to other providers as you already invested heavily into one provider.
Posts
Integrate device_preview, bot_toast and getx
void main() => runApp( DevicePreview( enabled: !kReleaseMode, builder: (context) => MyApp(), // Wrap your app ), ); class MyApp extends StatelessWidget { final botToastBuilder = BotToastInit(); @override Widget build(BuildContext context) { return GetMaterialApp.router( useInheritedMediaQuery: true, locale: DevicePreview.locale(context), builder: (context, child) { child = DevicePreview.appBuilder(context, child); child = botToastBuilder(context, child); return child; }, theme: ThemeData.light(), darkTheme: ThemeData.dark(), home: const HomePage(), ); } } Reference: https://pub.dev/packages/bot_toast
https://stackoverflow.
Posts
Spring devtools in action
I thought it was every easy to setup and use it using STS and gradle. The actual story is not so. I changed my settings followed Developing with Spring Boot and some suggestions here in stackoverflow, however liveload and autorestart don’t work.
After several rounds of trial, I noticed spring boot dashboard. I start my application from there, liveload and autorestart work now.
developmentOnly("org.
Posts
some packages cannot be resolved in eclipse with gradle projects
In the past two days, I always got the errors "packages cannot be resolved" in eclipse with gradle projects. Initial I encountered the issue, I desperately wanted to resolved the issue. I tried several ways to do that by using solutions from web, however I didn’t get my issue resolved. Due to time constraint, I went back to the old mvn way to do the project. Today I have sometime to revisit the issue now.
Posts
Beyond traceroute
I wondered why I was asked twice about network troubleshooting between two machines and the destination machine is not reachable directly. It seems there are somethings I didn’t understand fully or I missed something.
Today I googled "tracert is not enough" and found Traceroute Limitations Explained. It explains my doubts now.
Traceroute Limitations Explained gives some limitations of traceroute and introduce their production to avoid those limitations. Are there any other ways?
Posts
What's the difference between kustomization and component
The real differences is quoted here. You can find the content here
A kustomization that is marked as a Component has basically the same capabilities as a normal kustomization. The main distinction is that they are evaluated after the resources of the parent kustomization (overlay or component) have been accumulated, and on top of them. This means that: A component with transformers can transform the resources that an overlay has previously specified in the resources field.