This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: com.github.k8soperators.ch3/v1alpha1 | |
kind: GitOps | |
metadata: | |
name: gitops-sample | |
namespace: gitops | |
spec: | |
url: "" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Generated by Fabric8 CRDGenerator, manual edits might get overwritten! | |
apiVersion: apiextensions.k8s.io/v1 | |
kind: CustomResourceDefinition | |
metadata: | |
name: gitops.com.github.k8soperators.ch2 | |
spec: | |
group: com.github.k8soperators.ch2 | |
names: | |
kind: GitOps | |
plural: gitops |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kind: Cluster | |
apiVersion: kind.x-k8s.io/v1alpha4 | |
# One control plane node and three "workers". | |
# | |
# While these will not add more real compute capacity and | |
# have limited isolation, this can be useful for testing | |
# rolling updates etc. | |
# | |
# The API-server and other control plane components will be | |
# on the control-plane node. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import socket | |
def scan_ports(target, start_port, end_port): | |
open_ports = [] | |
for port in range(start_port, end_port + 1): | |
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | |
sock.settimeout(1) | |
result = sock.connect_ex((target, port)) | |
if result == 0: | |
open_ports.append(port) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
apiVersion: apiextensions.k8s.io/v1 | |
kind: CustomResourceDefinition | |
metadata: | |
annotations: | |
controller-gen.kubebuilder.io/version: v0.9.2 | |
creationTimestamp: null | |
name: entitlements.authz.authz | |
spec: | |
group: authz.authz |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kubectl create -f - -o yaml << EOF apiVersion: rbac.authorization.k8s.io/v1 | |
kind: Role | |
metadata: | |
name: kafka-cluster-admin-role | |
rules: | |
- apiGroups: ["kafka.io"] | |
resources: ["topics/test/abc"] | |
verbs: ["create", "delete"] | |
EOF |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ git clone [email protected]:kcp-dev/kcp.git | |
$ cd kcp | |
$ make build-all | |
``` | |
If $HOME/go/bin is not in your $PATH, you’ll need to add it, or feel free to move $HOME/go/bin/kubectl-kcp, kubectl-ws, kubectl-workspaces to someplace that is in your $PATH | |
``` | |
$ cd bin | |
$ ./kcp start |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dataseturl=https://gist.githubusercontent.com/akoserwal/4817cccbb53262056405bcc1eef37443/raw/7af7a0a6a60b5e2b8699f0c6e779c236e8f1055d/sample-output.json | |
map=$(curl $dataseturl | jq -r '.[]') | |
echo $map | |
echo $map | jq -r '[.id, .name, .value] | @csv'| tr -d '"' | \ | |
while IFS=, read -r id name value ; do | |
echo $id:$value | |
if [[ $name =~ test* ]] ; | |
then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"id": "3424234", | |
"name":"ex2", | |
"value": "exssasda" | |
}, | |
{ | |
"id": "342423e4", | |
"name":"test3", | |
"value": "tyetryxssasda" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"bytes" | |
"encoding/json" | |
"fmt" | |
"log" | |
"net/http" | |
"os/exec" | |
"strings" |