Posts

flux how do you get value from secret and substitute that with your helm releases

In helm, it is very common to deploy helm with secret values. This secret are typically kubernetes secret.  To see this in action, we will create a secret and then we will deploy our helm using HelmRelease from Flux (please do not mixed this up with Kustomization - we often used it together) Here is our secret and this is what it looks like :- apiVersion : v1 kind : Secret metadata :   name : external-dns-credentials   namespace : kube-system type : Opaque stringData :   tenantId : " tenantId "   subscriptionId : " subscriptionId "   resourceGroup : " my-resource-group "   aadClientId : "myclientId "   aadClientSecret : " mysecret " And this is the template that get the value file from a secret and put it into the proper place  apiVersion: helm.toolkit.fluxcd.io/v2 kind: HelmRelease metadata:   name: external-dns-ext spec:   releaseName: external-dns-ext   targetNamespace: kube-system   interval: 5m   chart:...

understanding flux build command line

Image
With flux build cli we can try to do a dry-run to see how the yaml gets generated without doing actual deployment. --path is a bases template of your deployment. Then --kustomization-file   is the overlay (cherry on top) or customization that you would like to add on top of your --path base template.  The command line looks like this. ./cluster/devtest/external-dns must exist.  flux build kustomization external-dns \   --path ./clusters/devtest/ external-dns \   --kustomization-file ./clusters/devtest/ external-dns-ks.yaml \   --dry-run ./cluster/devtest/external-dns/kustomization.yaml apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization namespace: kube-system resources:   - release.yaml ./cluster/devtest/external-dns/release.yaml apiVersion: helm.toolkit.fluxcd.io/v2 kind: HelmRelease metadata:   name: keda   namespace: keda spec:   releaseName: keda   targetNamespace: keda   chart:     spe...

kyverno reporter pods erroring out and crash loop with error "unable to find informer"

Bump into this error here and generally I don't think it will happened alot but the problem is Kyverno core pods is not available.  And the reporter being unable to find it, cough out this error. To resolve it, please reinstall your kyverno and it should be up and running. I tested with 3.7.0 and it seems to be working well for me.

android : @AndroidEntryPoint and @HiltViewModel usage

 @AndroidEntryPoint is an annotation used in Hilt, which is Google’s recommended library for Dependency Injection (DI) built on top of Dagger. What does it actually do? When you mark a class with @AndroidEntryPoint, Hilt generates an individual Hilt component for that specific Android class (in this case, your MainActivity). Member Injection: It allows the class to receive dependencies from Hilt. Without this, you couldn't use the @Inject annotation to get your ViewModels, Repositories, or API services into the Activity. Lifecycle Management: It ensures that the dependencies are tied to the Activity's lifecycle. Hilt will automatically handle creating the component in onCreate() and destroying it when the Activity is destroyed. There are a few things to remember how to use this. We need to use viewModel delegate @dagger.hilt.android.AndroidEntryPoint class MainActivity : ComponentActivity() { private val viewModel : HomeViewModel by viewModels () override fun onCreate (...

android error : (MainActivity}: java.lang.IllegalStateException: Hilt Activity must be attached to an @HiltAndroidApp Application. Did you forget to specify your Application's class name in your manifest's 's android:name attribute?

 Ran into this issue when working with my activity page  (MainActivity}: java.lang.IllegalStateException: Hilt Activity must be attached to an @HiltAndroidApp Application. Did you forget to specify your Application's class name in your manifest's <application />'s android:name attribute? To resolve this issue, we need to add android:name=".GetHomeApplication" <xmlns:tools="http://schemas.android.com/tools"> <uses-permission android:name="android.permission.INTERNET" /> <application     android:name=".GetHomeApplication"     android:allowBackup="true"     android:dataExtractionRules="@xml/data_extraction_rules"     android:fullBackupContent="@xml/backup_rules"     android:icon="@mipmap/ic_launcher"

mongodb - creating database user in a cluster

Image
 While trying to create a database user but my admin control doesn't seems to have this options And the funny thing is when I create a new project entirely, this options is available to me

mongosh install properly

To install mongosh property on ubuntu 24.04, we need to wget -qO- https://www.mongodb.org/static/pgp/server-8.0.asc | sudo tee /etc/apt/trusted.gpg.d/server-8.0.asc Then run  echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu noble/mongodb-org/8.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-8.0.list Next we will run  sudo apt-get update And then finally install it using  sudo apt-get install -y mongodb-mongosh To verify if it is running we run  mongosh --version

python strawberry graphql error : "Field 'ReportInput.propertyType' of required type 'String!' was not provided."

Ran into this issue saying my field is not defined. Here is my input definitions  @ strawberry . input class ReportInput :     location : LocationInput     property_type : str     current_analysis : str And here is my graphql mutations: mutation {   saveReport (     report : {       location : {         suburb : " St Albans "         state : " Melbourne "         country : " Australia "       }       property_type : " House "       currentAnalysis : " Property analysis details... "     }   ) {     status     id     location     propertyType     currentAnalysis   } } As you may have noticed ' property_type ' is the same. However, in grapghql convert it to camel casing with it has delimiter "_". So changing the mutation as follows works....

android - java.net.UnknownServiceException: CLEARTEXT communication to 10.0.2.2 not permitted by network security policy

 Bump into this error when trying to initate a service request to  java.net.UnknownServiceException: CLEARTEXT communication to 10.0.2.2 not permitted by network security policy 2026-05-05 20:57:52.706  8867-8867  System.err              com.appcoreopc.getmyhome             W  at okhttp3.internal.connection.RealConnection.connect(RealConnection.kt:188) 2026-05-05 20:57:52.706  8867-8867  System.err              com.appcoreopc.getmyhome             W  at okhttp3.internal.connection.ExchangeFinder.findConnection(ExchangeFinder.kt:226) 2026-05-05 20:57:52.706  8867-8867  System.err              com.appcoreopc.getmyhome             W  at okhttp3.internal.connection.ExchangeFinder.findHealthyConnection(ExchangeFinder.kt:106) ...

kotlin - Trailing lambda syntax

This is really an eye opening moment for me to see this in Kotlin - where we can pass the last parameter in a function body. It is call trailing lambda syntax. In the example, I am passing the value "10" like this to the function sayHello.  fun main () {     println ( " Hello, world!!! " )     sayHello () { #1 way to call it         10     }     sayHello { 10} #2 another way to call it } fun sayHello ( name : String = " jeremy " , value : () -> Int ) {     println ( " $name: ${ value ()}" ) } It is a much cleaner way to call it.

python strawberry-asgi was not found in the package registry

Bump into this error while trying to run uv pip install .  Because strawberry-asgi was not found in the package registry and graphql-microservice==0.1.0 depends on strawberry-asgi, we can conclude that graphql-microservice==0.1.0 cannot be used. And because only graphql-microservice==0.1.0 is available and you require graphql-microservice, we can conclud that your requirements are unsatisfiable. And the solution I need to add " strawberry-graphql[asgi] " to my pyproject.toml  [ build - system ] requires = [ " setuptools>=61.0 " ] build - backend = " setuptools.build_meta " [ project ] name = " graphql-microservice " version = " 0.1.0 " dependencies = [     " strawberry-graphql[asgi] " , <---- Added this     " uvicorn " ,     " python-dotenv " ,     " google-cloud-aiplatform " , ]

google agents-cli for ADK - it is worth learning this

Image
This is quite a handy tool that we can use to work with ADK. It is newer than the adk tool and its repo can be found here https://google.github.io/agents-cli/guide/quickstart-tutorial/ Let's get started.  To create an agentic scaffold quickly (this will create basic agentic code, your private virtual environment, docker file, pyproject.toml, without CICD) agents-cli create my-agent --prototype --yes To create use agentic ADK, uses agentic_runtime (you can choose cloud run or GKE) and with github as the CICD agents-cli create my_agent2 -d agent_runtime  --cicd-runner github_actions --agent adk If you would like to get a base template, you can run the following command  agents-cli create my_agent2 -d agent_runtime  --cicd-runner github_actions --agent adk To add a new deployment target 🔥and other examples:- agents-cli scaffold enhance --deployment-target cloud_run # Add Cloud Run deployment agents-cli scaffold enhance --deployment-target cloud_run # Add a RAG datastor...

google adk create app from template command

This gotta be one of the most useful command in Google ADK template  uvx agent-starter-pack create my-retail-agent -a adk@retail-ai-location-strategy Other options include uvx agent-start-pack enhance uvx agent-start-pack extract uvx agent-start-pack list uvx agent-start-pack register-gemini-enterprise uvx agent-start-pack setup-cicd uvx agent-start-pack upgrade

creating a rust http testing client

This is an example of a rust http test client that i used to run test periodically.  use clap ::{ Parser , ValueEnum }; use indicatif ::{ ProgressBar , ProgressStyle }; use reqwest ::{ Client , Method }; use std :: collections :: HashMap ; use tokio :: time ::{ sleep , Duration }; // Added tokio sleep use serde_json :: Value ; #[ derive ( Copy , Clone , PartialEq , Eq , PartialOrd , Ord , ValueEnum , Debug )] enum HttpMethod {     Get ,     Post ,     Put , } #[ derive ( Parser , Debug )] #[ command ( author , version , about = " A simple HTTP load tester " )] struct Config {     /// HTTP Method to use     #[ arg ( short , long , value_enum , default_value_t = HttpMethod :: Get )]     method : HttpMethod ,     /// Target URL endpoint     #[ arg ( short , long )]     url : String ,     /// Number of tests to run     #[ arg ( short , long , ...