This file contains 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
// Define the URL where updates are available | |
string updateUrl = "http://yourdomain.com/update.xml"; | |
// Check for updates | |
var updateChecker = new System.Net.WebClient(); | |
string updateXml = updateChecker.DownloadString(updateUrl); | |
// Parse the update XML | |
var doc = new System.Xml.XmlDocument(); | |
doc.LoadXml(updateXml); |
This file contains 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
#!/bin/sh | |
mkdir -p .choreo | |
mkdir -p .githook | |
cat > .githook/pre-commit <<EOF | |
#!/bin/bash | |
APP_NAME=$(cat Ballerina.toml | grep "name =" | cut -d"=" -f2- | sed 's/\"//g; s/\ //g') | |
rm -rf .choreo/build | |
mkdir -p .choreo/build |
This file contains 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: "cilium.io/v2" | |
kind: CiliumNetworkPolicy | |
metadata: | |
name: "defult-capture" | |
spec: | |
endpointSelector: | |
matchLabels: {} | |
egress: | |
- toFQDNs: | |
- matchPattern: "*" |
This file contains 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: cilium.io/v2 | |
kind: CiliumEnvoyConfig | |
metadata: | |
name: envoy-lb-listener | |
namespace: default | |
spec: | |
services: | |
- name: traffic-split-svc | |
namespace: default | |
backendServices: |
This file contains 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: v1 | |
clusters: | |
- cluster: | |
server: <insert-data-2> | |
insecure-skip-tls-verify: true | |
name: katakoda-cluster | |
contexts: | |
- context: | |
cluster: katakoda-cluster | |
user: katakoda-cluster |
This file contains 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: rbac.authorization.k8s.io/v1 | |
kind: ClusterRole | |
metadata: | |
annotations: | |
rbac.authorization.kubernetes.io/autoupdate: "true" | |
labels: | |
kubernetes.io/bootstrapping: rbac-defaults | |
name: cluster-admin | |
rules: | |
- apiGroups: |
This file contains 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
#generate service pricipal id and password using below command under shell script file | |
# Modify for your environment. | |
ACR_NAME=$1 | |
SERVICE_PRINCIPAL_NAME=$2 | |
ACR_NAME=cloudmanager.azurecr.io | |
SERVICE_PRINCIPAL_NAME=acr-service-principal | |
# Obtain the full registry ID for subsequent command args | |
ACR_REGISTRY_ID=$(az acr show --name $ACR_NAME --query id --output tsv) |
This file contains 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: v1 | |
kind: Pod | |
metadata: | |
name: counter | |
spec: | |
containers: | |
- name: date | |
image: busybox | |
args: |
This file contains 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
#!/bin/bash | |
## prerequisites-kubernetes.sh | |
## Generic installation on all nodes | |
K8S_VERSION="$1" | |
## Enable IP Forwarding | |
sysctl -w net.ipv4.ip_forward=1 | |
sed -i 's/#net.ipv4.ip_forward=1/net.ipv4.ip_forward=1/g' /etc/sysctl.conf | |
sudo sysctl -p /etc/sysctl.conf |
This file contains 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
#!/bin/sh | |
api="$1" | |
namespace="$2" | |
insecure="$3" | |
dir="$4" | |
output="$(kubectl get api $api -n $namespace -o json | jq '.metadata.name' -r)" | |
echo "$output" |
NewerOlder