-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
09cb008
commit 58c66d3
Showing
39 changed files
with
1,210 additions
and
1,013 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
node_modules | ||
node_modules | ||
.history |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
language: go | ||
go: | ||
- 1.12.x | ||
sudo: required | ||
dist: xenial | ||
addons: | ||
snaps: | ||
- name: kubectl | ||
confinement: classic | ||
- name: helm | ||
confinement: classic | ||
- name: node | ||
channel: "8/stable" | ||
confinement: classic | ||
|
||
branches: | ||
only: | ||
- "master" | ||
|
||
install: skip | ||
|
||
before_script: | ||
- sudo mv bin/linux/amd64/kind /usr/local/bin | ||
- go get github.com/ibm/kone/cmd/kone | ||
|
||
jobs: | ||
include: | ||
- install: skip | ||
name: "Serving 0.10.0 / Eventing 0.10.0" | ||
script: | ||
- test/e2e.sh 0.10.0 0.10.0 | ||
|
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
Binary file not shown.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
kind: Cluster | ||
apiVersion: kind.sigs.k8s.io/v1alpha3 | ||
nodes: | ||
- role: control-plane | ||
- role: worker | ||
extraPortMappings: | ||
- containerPort: 31380 # istio-ingressgateway | ||
hostPort: 8080 | ||
listenAddress: "127.0.0.1" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Copyright 2019 IBM Corporation | ||
# | ||
# 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 | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
|
||
function couchdb::get_document() { | ||
local url=$1 | ||
local database=$2 | ||
local id=$3 | ||
curl -s "$url/$database/$id" | ||
} | ||
|
||
function couchdb::create_document() { | ||
local url=$1 | ||
local database=$2 | ||
local data=$3 | ||
|
||
curl "$url/$database" \ | ||
-H "Content-Type: application/json" \ | ||
-d "$data" | ||
|
||
return 0 | ||
} | ||
|
||
function couchdb::delete_document() { | ||
local url=$1 | ||
local database=$2 | ||
local id=$3 | ||
|
||
local doc=$(couchdb::get_document "$url" "$database" "$id") | ||
local rev=$(echo $doc | jq -r "._rev") | ||
|
||
|
||
curl -X DELETE -s "$url/$database/$id?rev=$rev" | ||
return 0 | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Copyright 2019 IBM Corporation | ||
# | ||
# 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 | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
function ic::install_seed_operators() { | ||
local cloudversion=$1 | ||
|
||
if [[ $cloudversion == "" ]]; then | ||
echo "install seed latest" | ||
cloud_base=https://raw.githubusercontent.com/IBM/cloud-operators/master/releases/v0.1.2/ | ||
fi | ||
|
||
kubectl apply -f ${cloud_base}/000_namespace.yaml | ||
kubectl apply -f ${cloud_base}/001_ibmcloud_v1alpha1_binding.yaml | ||
kubectl apply -f ${cloud_base}/002_ibmcloud_v1alpha1_service.yaml | ||
kubectl apply -f ${cloud_base}/003_serviceaccount.yaml | ||
kubectl apply -f ${cloud_base}/004_manager_role.yaml | ||
kubectl apply -f ${cloud_base}/005_rbac_role_binding.yaml | ||
kubectl apply -f ${cloud_base}/006_deployment.yaml | ||
|
||
k8s::wait_until_pods_running ibmcloud-operators | ||
|
||
return 0 | ||
} | ||
|
||
function ic::configure_operators() { | ||
local apikey=$1 | ||
local region=$2 | ||
|
||
cat <<EOF | kubectl apply -f - | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: seed-secret | ||
labels: | ||
seed.ibm.com/ibmcloud-token: "apikey" | ||
app.kubernetes.io/name: ibmcloud-operator | ||
type: Opaque | ||
stringData: | ||
api-key: ${apikey} | ||
region: ${region} | ||
EOF | ||
|
||
cat <<EOF | kubectl apply -f - | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: seed-defaults | ||
labels: | ||
app.kubernetes.io/name: ibmcloud-operator | ||
data: | ||
org: org | ||
region: ${region} | ||
resourceGroup: default | ||
space: space | ||
EOF | ||
|
||
return 0 | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Copyright 2019 IBM Corporation | ||
# | ||
# 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 | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
function istio::install_lean() { | ||
local ISTIO_VERSION=$1 | ||
|
||
if [[ "$ISTIO_VERSION" == "" ]]; then | ||
u::fatal "usage istio::install <istio_version>: missing argument" | ||
fi | ||
|
||
u::header "installing istio" | ||
ISTIO_DIR=$(mktemp -d) | ||
pushd $ISTIO_DIR | ||
|
||
export ISTIO_VERSION | ||
curl -L https://git.io/getLatestIstio | sh - | ||
cd istio-${ISTIO_VERSION} | ||
|
||
for i in install/kubernetes/helm/istio-init/files/crd*yaml; do | ||
kubectl apply -f $i; | ||
done | ||
|
||
sleep 2 | ||
|
||
set +e | ||
kubectl create ns istio-system | ||
kubectl label ns istio-system istio-injection=disabled | ||
set -e | ||
|
||
helm template --namespace=istio-system \ | ||
--set prometheus.enabled=false \ | ||
--set mixer.enabled=false \ | ||
--set mixer.policy.enabled=false \ | ||
--set mixer.telemetry.enabled=false \ | ||
`# Pilot doesn't need a sidecar.` \ | ||
--set pilot.sidecar=false \ | ||
--set pilot.resources.requests.memory=128Mi \ | ||
--set pilot.resources.requests.cpu=100m \ | ||
`# Disable galley (and things requiring galley).` \ | ||
--set galley.enabled=false \ | ||
--set global.useMCP=false \ | ||
`# Disable security / policy.` \ | ||
--set security.enabled=false \ | ||
--set global.disablePolicyChecks=true \ | ||
`# Disable sidecar injection.` \ | ||
--set sidecarInjectorWebhook.enabled=false \ | ||
--set global.proxy.autoInject=disabled \ | ||
--set global.omitSidecarInjectorConfigMap=true \ | ||
`# Set gateway pods to 1 to sidestep eventual consistency / readiness problems.` \ | ||
--set gateways.istio-ingressgateway.autoscaleMin=1 \ | ||
--set gateways.istio-ingressgateway.autoscaleMax=1 \ | ||
`# Set pilot trace sampling to 100%` \ | ||
--set pilot.traceSampling=100 \ | ||
install/kubernetes/helm/istio \ | ||
> ./istio-lean.yaml | ||
|
||
kubectl apply -f istio-lean.yaml | ||
# kubectl patch -n istio-system deployments.apps istio-pilot -p '{"spec": {"template": {"spec": {"containers": [{"name": "discovery", "resources": {"requests": {"cpu":"100m"}}}]}}}}' | ||
|
||
echo "install local cluster gateway" | ||
|
||
helm template --namespace=istio-system \ | ||
--set gateways.custom-gateway.autoscaleMin=1 \ | ||
--set gateways.custom-gateway.autoscaleMax=1 \ | ||
--set gateways.custom-gateway.cpu.targetAverageUtilization=60 \ | ||
--set gateways.custom-gateway.labels.app='cluster-local-gateway' \ | ||
--set gateways.custom-gateway.labels.istio='cluster-local-gateway' \ | ||
--set gateways.custom-gateway.type='ClusterIP' \ | ||
--set gateways.istio-ingressgateway.enabled=false \ | ||
--set gateways.istio-egressgateway.enabled=false \ | ||
--set gateways.istio-ilbgateway.enabled=false \ | ||
install/kubernetes/helm/istio \ | ||
-f install/kubernetes/helm/istio/example-values/values-istio-gateways.yaml \ | ||
| sed -e "s/custom-gateway/cluster-local-gateway/g" -e "s/customgateway/clusterlocalgateway/g" \ | ||
> ./istio-local-gateway.yaml | ||
|
||
kubectl apply -f istio-local-gateway.yaml | ||
|
||
popd | ||
|
||
k8s::wait_until_pods_running istio-system | ||
|
||
return 0 | ||
} |
Oops, something went wrong.