LFX Mentee Spring '22 - KubeArmor Associate Product Enginner at Infracloud
This talk will be divided into two part
- About the project
- Mentorship Experience
package main | |
import ( | |
"context" | |
"flag" | |
"fmt" | |
"path/filepath" | |
v1 "k8s.io/apimachinery/pkg/apis/meta/v1" | |
"k8s.io/client-go/kubernetes" |
{ | |
"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 |