Skip to content
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

chore: support to deploy ingress-apisix through helm charts #153

Merged
merged 9 commits into from
Jan 8, 2021

Conversation

tokers
Copy link
Contributor

@tokers tokers commented Jan 4, 2021

Closing #130.

charts/ingress-apisix/templates/tests/test-connection.yaml Outdated Show resolved Hide resolved
docs/install.md Show resolved Hide resolved
charts/ingress-apisix/values.yaml Outdated Show resolved Hide resolved
@codecov-io
Copy link

codecov-io commented Jan 5, 2021

Codecov Report

Merging #153 (3af3037) into master (782730a) will increase coverage by 14.07%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff             @@
##           master     #153       +/-   ##
===========================================
+ Coverage   36.27%   50.35%   +14.07%     
===========================================
  Files          28       30        +2     
  Lines        1257     1414      +157     
===========================================
+ Hits          456      712      +256     
+ Misses        771      618      -153     
- Partials       30       84       +54     
Impacted Files Coverage Δ
cmd/ingress/ingress.go 72.13% <0.00%> (-6.76%) ⬇️
pkg/seven/state/solver.go 6.15% <0.00%> (-3.61%) ⬇️
pkg/seven/conf/conf.go 0.00% <0.00%> (ø)
pkg/seven/state/builder.go 0.00% <0.00%> (ø)
pkg/seven/state/route_worker.go 0.00% <0.00%> (ø)
pkg/seven/state/service_worker.go 0.00% <0.00%> (ø)
pkg/seven/apisix/ssl.go
pkg/seven/apisix/route.go
pkg/seven/apisix/service.go
pkg/seven/apisix/upstream.go
... and 10 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 782730a...3af3037. Read the comment docs.

charts/ingress-apisix/templates/service.yaml Outdated Show resolved Hide resolved
charts/ingress-apisix/templates/deployment.yaml Outdated Show resolved Hide resolved
charts/ingress-apisix/templates/deployment.yaml Outdated Show resolved Hide resolved
Copy link
Contributor

@gxthrj gxthrj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ .Values.rbac.serviceAccount }}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this name could be fixed format, such as {{ .Release.Name }} or {{ .Release.Name }}-svcacc, it will make values.yaml more simple.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, will change it.

rules:
- apiGroups:
- ""
resources:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we really need to watch so many resource?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here are the resources we may deal with at the moment.
pods/endpoints/services/replicationcontrollers/replicationcontrollers/scale is needed by now.
configmaps/persistentvolumeclaims can be used to do some enhancements in future.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Although I can't imagine what a controller watch so many resources can do, but if you are sure they are needed, so be it

metadata:
name: {{ .Values.rbac.serviceAccount }}
labels:
{{- include "base.labels" . | nindent 4 }}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we really need user to control the labels and annotation? This will complicate values.yaml

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

labels are not necessary here, we can remove it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed.

volumeMounts:
- mountPath: /ingress-apisix/conf
name: configuration
{{- with .Values.ingressController.nodeSelector }}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nodeSelector and affinity is similar, just one of them is enough

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed.

imagePullPolicy: {{ .Values.ingressController.image.pullPolicy }}
ports:
- name: http
containerPort: {{ (.Values.ingressController.config.httpListen | split ":")._1 }}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.Values.ingressController.config.httpListen is :8080, but liveness work at 80(http)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where shows the 80?

The containerPort is refined from the httpListen.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You use a IANA_SVC_NAME, http, to define livenessProbe's port, according here, the port is 80.

serviceAccount: "apisix-view-serviceaccount"

service:
type: ClusterIP

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This option can not work well, if we selected NodePort, we maybe need to specified node port, but here is no such parameter.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, for now, the service of ingress controller doesn't have too much sense (only /healthz and Prometheus metrics), will hardcoded the service type to ClusterIP

charts/ingress-apisix/values.yaml Show resolved Hide resolved
type: ClusterIP
ports:
- port: {{ .Values.ingressController.service.port }}
targetPort: http

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here also use the container's port name

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

@tokers tokers merged commit c597409 into apache:master Jan 8, 2021
@tokers tokers deleted the chore/charts branch January 8, 2021 13:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants