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

application: init webhook #359

Merged
merged 3 commits into from Aug 3, 2023
Merged

Conversation

Xieql
Copy link
Contributor

@Xieql Xieql commented Jul 10, 2023

What type of PR is this?
/kind feature

What this PR does / why we need it:

  1. The Fleet Manager currently lacks a webhook, so this PR introduces one. Currently, it shares the same certificate with the Cluster Operator. A separate certificate can be created, if necessary.

  2. This PR also initializes a validator webhook for the Application.

part of #336

also the relization of #316 , because fleet must be consistent throughout the application when using current validator

Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

add validator for application

@netlify
Copy link

netlify bot commented Jul 10, 2023

Deploy Preview for kurator-dev canceled.

Name Link
🔨 Latest commit 96ee0af
🔍 Latest deploy log https://app.netlify.com/sites/kurator-dev/deploys/64cb2157f528140008bf158b

Signed-off-by: Xieql <xieqianglong@huawei.com>
@@ -22,10 +22,23 @@ spec:
image: {{ .Values.image.hub }}/fleet-manager:{{ .Values.image.tag }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
name: manager
ports:
- containerPort: 9443
Copy link
Member

Choose a reason for hiding this comment

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

why 9443

Copy link
Member

Choose a reason for hiding this comment

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

I am not sure how the code allows customizing webhook-port while in this manifest it is hardcoding. Can this work?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, it has been tested and it works. I refer this:

- containerPort: 9443
name: webhook-server
protocol: TCP

Copy link
Member

Choose a reason for hiding this comment

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

Not very right, if you specify a different via flag

name: webhook-server
protocol: TCP
volumeMounts:
- mountPath: /tmp/k8s-webhook-server/serving-certs
Copy link
Member

Choose a reason for hiding this comment

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

same here hardcoding vs allowing customization

Copy link
Member

@hzxuzhonghu hzxuzhonghu left a comment

Choose a reason for hiding this comment

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

@Xieql Please take a look at the left question

Signed-off-by: Xieql <xieqianglong@huawei.com>
@Xieql
Copy link
Contributor Author

Xieql commented Aug 2, 2023

@Xieql Please take a look at the left question

fixed

Signed-off-by: Xieql <xieqianglong@huawei.com>
Copy link
Member

@hzxuzhonghu hzxuzhonghu left a comment

Choose a reason for hiding this comment

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

/lgtm

@kurator-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hzxuzhonghu

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@hzxuzhonghu
Copy link
Member

/label tide/merge-method-squash

@kurator-bot kurator-bot merged commit e39c2e9 into kurator-dev:main Aug 3, 2023
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants