-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
install istio with helm #18
Open
cjsrycjsyr16
wants to merge
2
commits into
hango-io:master
Choose a base branch
from
cjsrycjsyr16:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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,3 @@ | ||
# Chart dependencies | ||
.idea | ||
|
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,42 @@ | ||
stages: | ||
- package | ||
|
||
before_script: | ||
- CHART_VERSION="${CI_COMMIT_TAG:-v0.0.0-r$CI_PIPELINE_ID}" | ||
|
||
variables: | ||
NAMESPACE: istio | ||
RELEASE_NAME: istio | ||
|
||
helm_package: | ||
stage: package | ||
variables: | ||
REPO_NAME: cloudnative | ||
KUBECONFIG_YAML: $KUBECONFIG_DEV | ||
script: | ||
- mkdir -p target | ||
- helm package --version="$CHART_VERSION" -d target . || exit 1 | ||
- echo "$CHART_VERSION" | ||
- | | ||
# helm upgrade -n $NAMESPACE $RELEASE_NAME . --install --create-namespace --dry-run | ||
|
||
REPO_ADDR="$(jq -r '.repo//empty'<<<"$ONLINE_CHART_REPO")" | ||
USERNAME="$(jq -r '.username//empty'<<<"$ONLINE_CHART_REPO")" | ||
PASSWORD="$(jq -r '.password//empty'<<<"$ONLINE_CHART_REPO")" | ||
|
||
helm repo add --insecure-skip-tls-verify --username="$USERNAME" \ | ||
--password="$PASSWORD" "$REPO_NAME" "$REPO_ADDR/chartrepo/$REPO_NAME" --force-update | ||
helm push --insecure target/$(cd target; ls | grep tgz) "$REPO_NAME" || exit 1 | ||
- | | ||
REPO_ADDR="$(jq -r '.repo//empty'<<<"$ONLINE_CHART_REPO")" | ||
USERNAME="$(jq -r '.username//empty'<<<"$ONLINE_CHART_REPO")" | ||
PASSWORD="$(jq -r '.password//empty'<<<"$ONLINE_CHART_REPO")" | ||
|
||
helm repo add --insecure-skip-tls-verify --username="$USERNAME" \ | ||
--password="$PASSWORD" "$REPO_NAME" "$REPO_ADDR/chartrepo/$REPO_NAME" --force-update | ||
helm push --insecure target/$(cd target; ls | grep tgz) "$REPO_NAME" || exit 1 | ||
|
||
only: | ||
- develop | ||
- tags | ||
|
||
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,26 @@ | ||
# Patterns to ignore when building packages. | ||
# This supports shell glob matching, relative path matching, and | ||
# negation (prefixed with !). Only one pattern per line. | ||
.DS_Store | ||
# Common VCS dirs | ||
.git/ | ||
.gitignore | ||
.bzr/ | ||
.bzrignore | ||
.hg/ | ||
.hgignore | ||
.svn/ | ||
# Common backup files | ||
*.swp | ||
*.bak | ||
*.tmp | ||
*~ | ||
# Various IDEs | ||
.project | ||
.idea/ | ||
*.tmproj | ||
# helm/charts | ||
OWNERS | ||
hack/ | ||
ci/ | ||
kube-prometheus-*.tgz |
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,19 @@ | ||
apiVersion: v2 | ||
name: istio | ||
|
||
# | ||
# Application charts are a collection of templates that can be packaged into versioned archives | ||
# to be deployed. | ||
# | ||
# Library charts provide useful utilities or functions for the chart developer. They're included as | ||
# a dependency of application charts to inject those utilities and functions into the rendering | ||
# pipeline. Library charts do not define any templates and therefore cannot be deployed. | ||
type: application | ||
|
||
# This is the chart version. This version number should be incremented each time you make changes | ||
# to the chart and its templates, including the app version. | ||
# Versions are expected to follow Semantic Versioning (https://semver.org/) | ||
# | ||
# this version will be overwritten during helm package stage by gitlab-ci | ||
version: 0.0.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,220 @@ | ||
--- | ||
# Source: istio-operator/templates/namespace.yaml | ||
apiVersion: v1 | ||
kind: Namespace | ||
metadata: | ||
name: istio-operator | ||
labels: | ||
istio-operator-managed: Reconcile | ||
istio-injection: disabled | ||
--- | ||
# Source: istio-operator/templates/service_account.yaml | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
namespace: istio-operator | ||
name: istio-operator | ||
--- | ||
# Source: istio-operator/templates/clusterrole.yaml | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRole | ||
metadata: | ||
creationTimestamp: null | ||
name: istio-operator | ||
rules: | ||
# istio groups | ||
- apiGroups: | ||
- authentication.istio.io | ||
resources: | ||
- '*' | ||
verbs: | ||
- '*' | ||
- apiGroups: | ||
- config.istio.io | ||
resources: | ||
- '*' | ||
verbs: | ||
- '*' | ||
- apiGroups: | ||
- install.istio.io | ||
resources: | ||
- '*' | ||
verbs: | ||
- '*' | ||
- apiGroups: | ||
- networking.istio.io | ||
resources: | ||
- '*' | ||
verbs: | ||
- '*' | ||
- apiGroups: | ||
- security.istio.io | ||
resources: | ||
- '*' | ||
verbs: | ||
- '*' | ||
# k8s groups | ||
- apiGroups: | ||
- admissionregistration.k8s.io | ||
resources: | ||
- mutatingwebhookconfigurations | ||
- validatingwebhookconfigurations | ||
verbs: | ||
- '*' | ||
- apiGroups: | ||
- apiextensions.k8s.io | ||
resources: | ||
- customresourcedefinitions.apiextensions.k8s.io | ||
- customresourcedefinitions | ||
verbs: | ||
- '*' | ||
- apiGroups: | ||
- apps | ||
- extensions | ||
resources: | ||
- daemonsets | ||
- deployments | ||
- deployments/finalizers | ||
- replicasets | ||
verbs: | ||
- '*' | ||
- apiGroups: | ||
- autoscaling | ||
resources: | ||
- horizontalpodautoscalers | ||
verbs: | ||
- '*' | ||
- apiGroups: | ||
- monitoring.coreos.com | ||
resources: | ||
- servicemonitors | ||
verbs: | ||
- get | ||
- create | ||
- update | ||
- apiGroups: | ||
- policy | ||
resources: | ||
- poddisruptionbudgets | ||
verbs: | ||
- '*' | ||
- apiGroups: | ||
- rbac.authorization.k8s.io | ||
resources: | ||
- clusterrolebindings | ||
- clusterroles | ||
- roles | ||
- rolebindings | ||
verbs: | ||
- '*' | ||
- apiGroups: | ||
- coordination.k8s.io | ||
resources: | ||
- leases | ||
verbs: | ||
- get | ||
- create | ||
- update | ||
- apiGroups: | ||
- "" | ||
resources: | ||
- configmaps | ||
- endpoints | ||
- events | ||
- namespaces | ||
- pods | ||
- pods/proxy | ||
- persistentvolumeclaims | ||
- secrets | ||
- services | ||
- serviceaccounts | ||
verbs: | ||
- '*' | ||
--- | ||
# Source: istio-operator/templates/clusterrole_binding.yaml | ||
kind: ClusterRoleBinding | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
metadata: | ||
name: istio-operator | ||
subjects: | ||
- kind: ServiceAccount | ||
name: istio-operator | ||
namespace: istio-operator | ||
roleRef: | ||
kind: ClusterRole | ||
name: istio-operator | ||
apiGroup: rbac.authorization.k8s.io | ||
--- | ||
# Source: istio-operator/templates/service.yaml | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
namespace: istio-operator | ||
labels: | ||
name: istio-operator | ||
name: istio-operator | ||
spec: | ||
ports: | ||
- name: http-metrics | ||
port: 8383 | ||
targetPort: 8383 | ||
protocol: TCP | ||
selector: | ||
name: istio-operator | ||
--- | ||
# Source: istio-operator/templates/deployment.yaml | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
namespace: istio-operator | ||
name: istio-operator | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
name: istio-operator | ||
template: | ||
metadata: | ||
labels: | ||
name: istio-operator | ||
spec: | ||
serviceAccountName: istio-operator | ||
containers: | ||
- name: istio-operator | ||
image: docker.io/istio/operator:1.10.2 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. image 可以提取到values中 |
||
command: | ||
- operator | ||
- server | ||
securityContext: | ||
allowPrivilegeEscalation: false | ||
capabilities: | ||
drop: | ||
- ALL | ||
privileged: false | ||
readOnlyRootFilesystem: true | ||
runAsGroup: 1337 | ||
runAsUser: 1337 | ||
runAsNonRoot: true | ||
imagePullPolicy: IfNotPresent | ||
resources: | ||
limits: | ||
cpu: 200m | ||
memory: 256Mi | ||
requests: | ||
cpu: 50m | ||
memory: 128Mi | ||
env: | ||
- name: WATCH_NAMESPACE | ||
value: "hango-system" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 变量可以提取到values中 |
||
- name: LEADER_ELECTION_NAMESPACE | ||
value: "istio-operator" | ||
- name: POD_NAME | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: metadata.name | ||
- name: OPERATOR_NAME | ||
value: "istio-operator" | ||
- name: WAIT_FOR_RESOURCES_TIMEOUT | ||
value: "120s" | ||
- name: REVISION | ||
value: "" |
Empty file.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is unnecessary for this PR