Skip to content

Instantly share code, notes, and snippets.

View jayunit100's full-sized avatar
🎯
Focusing

jay vyas jayunit100

🎯
Focusing
View GitHub Profile
@jayunit100
jayunit100 / netpol2.go
Created February 14, 2020 17:13
rewritten w/ builders
/*
Copyright 2016 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
package utils
import (
v1 "k8s.io/api/core/v1"
networkingv1 "k8s.io/api/networking/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/intstr"
)
/*
Copyright 2016 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
package network
/**
builder.SetTypeIngress().
AddIngress(nil, &p80, nil, nil, &map[string]string{"pod-name": "client-a"}, nil, nil, nil)
/*
Copyright 2016 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
/*
Copyright 2016 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
This file has been truncated, but you can view the full file.
I0204 11:09:02.015651 1 reflector.go:385] pkg/mod/k8s.io/[email protected]/tools/cache/reflector.go:98: Watch close - *v1alpha2.Cluster total 0 items received
I0204 11:09:10.000845 1 reflector.go:385] pkg/mod/k8s.io/[email protected]/tools/cache/reflector.go:98: Watch close - *v1alpha2.KubeadmConfig total 0 items received
I0204 11:10:00.326225 1 reflector.go:385] pkg/mod/k8s.io/[email protected]/tools/cache/reflector.go:98: Watch close - *v1.ConfigMap total 729 items received
I0204 11:13:14.016737 1 reflector.go:385] pkg/mod/k8s.io/[email protected]/tools/cache/reflector.go:98: Watch close - *v1alpha2.Machine total 0 items received
I0204 11:16:48.414820 1 reflector.go:385] pkg/mod/k8s.io/[email protected]/tools/cache/reflector.go:98: Watch close - *v1.Secret total 0 items received
I0204 11:16:58.327508 1 reflector.go:385] pkg/mod/k8s.io/clie
#!/bin/bash
cat << EOF > ss.yaml
apiVersion: v1
kind: Service
metadata:
name: nginx
labels:
app: nginx
spec:
# This is a direct copy of the upstream calico 3.11 YAML (https://docs.projectcalico.org/v3.11/manifests/calico.yaml)
---
# Source: calico/templates/calico-config.yaml
# This ConfigMap is used to configure a self-hosted Calico installation.
kind: ConfigMap
apiVersion: v1
metadata:
name: calico-config
namespace: kube-system
data:
0a1,2
> # Calico Version v3.6
> # https://docs.projectcalico.org/v3.6/release-notes/
12c14
< # Configure the backend to use.
---
> # Configure the Calico backend to use.
23c25
< "cniVersion": "0.3.1",
---