Skip to content

Instantly share code, notes, and snippets.

View slayer321's full-sized avatar
🎯
Focusing

Sachin Maurya slayer321

🎯
Focusing
View GitHub Profile
@slayer321
slayer321 / cfp.md
Last active December 7, 2022 05:00
LFX Mentorship showcase 2023

LFX Mentorship and Me

About me:

LFX Mentee Spring '22 - KubeArmor Associate Product Enginner at Infracloud

This talk will be divided into two part

  1. About the project
  2. Mentorship Experience
@slayer321
slayer321 / client.go
Created December 1, 2022 07:21
Get time and name of pods
package main
import (
"context"
"flag"
"fmt"
"path/filepath"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/client-go/kubernetes"
@slayer321
slayer321 / file.json
Last active June 12, 2022 16:05
KubeArmor telemetry
{
"Timestamp": 1647101470,
"UpdatedTime": "2022-03-12T16:11:10.296322Z",
"ClusterName": "default",
"HostName": "kubearmor-dev",
"NamespaceName": "wordpress-mysql",
"PodName": "wordpress-54dd4449df-992rm",
"ContainerID": "6e0ecd721430180196ab982d08515a1f69c5eb86ec1dafd554d8ca7e0830047d",
"ContainerName": "wordpress",
"HostPID": 12297,
func JSONPatchPathHasForwardSlash(patch string) bool {
jsonPatch, err := yaml.ToJSON([]byte(patch))
if err != nil {
return err
}
decodedPatch, err := jsonpatch.DecodePatch(jsonPatch)

I did both the testing as it was mention is the test dir

For integration test

➜  test git:(i1881-support-auto-merge) go test -v -tags=integration ./integration
!!! Skipping test because the required environment variable (GITHUB_USERNAME) is not present. !!!

!!! Skipping test because the required environment variable (GITHUB_PASSWORD) is not present. !!!
name: Lint
on: [push , pull_request]
jobs:
run-linters:
name: Run linters
runs-on: ubuntu-latest