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

Add Makefile (#9) #22

Closed
wants to merge 7 commits into from
Closed

Add Makefile (#9) #22

wants to merge 7 commits into from

Conversation

joaoepj
Copy link

@joaoepj joaoepj commented Nov 9, 2022

Fixes #9

@CLAassistant
Copy link

CLAassistant commented Nov 9, 2022

CLA assistant check
All committers have signed the CLA.

@sczyh30 sczyh30 added the area/build-release Category issues or PRs related to build and release the control plane. label Nov 9, 2022
Makefile Outdated
@@ -0,0 +1,18 @@
BIN_NAME=opensergo-control-plane
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could you please add the license header in the first line, like following:

# Copyright 2022, OpenSergo Authors
#
# 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.

@joaoepj
Copy link
Author

joaoepj commented Nov 9, 2022

Just found a more complete Makefile in the develop branch. Should we use this instead?

@jnan806
Copy link
Collaborator

jnan806 commented Nov 9, 2022

That's OK ~ And there are some commands is not needed at this time in the Makefile of develop branch, You can ignore them by delete or comment. And also should verify the availability of commands you picked.

@joaoepj
Copy link
Author

joaoepj commented Nov 14, 2022

I have reviewed both Makefiles. Most of the develop branch recipes perform tasks like usage help, code generation, docker resource management, as well as compiling go code. As this tasks are now executed by other tools I kept my branch's Makefile as simple as possible.

@jnan806
Copy link
Collaborator

jnan806 commented Nov 15, 2022

em.... In the relation ISSUE, commands for generating CRD and proto stub cod is required 😂 , could you help to complete the commands please ?

@joaoepj
Copy link
Author

joaoepj commented Nov 15, 2022

em.... In the relation ISSUE, commands for generating CRD and proto stub cod is required 😂 , could you help to complete the commands please ?

Well, I sure can! But I need to acquire a more comprehensive view of the whole CI/CD process. I'll do my home work but, can you give some advice in this sense?

@jnan806
Copy link
Collaborator

jnan806 commented Nov 16, 2022

the whole CI/CD process? the CRD means Custom Resource Definition in kubernetes, I think your understanding of CRD is biased

@joaoepj
Copy link
Author

joaoepj commented Nov 23, 2022

This Makefile is automatically generated by operator-sdk and only care about k8s operator aspects.

@joaoepj joaoepj requested a review from jnan806 November 23, 2022 12:00
@joaoepj
Copy link
Author

joaoepj commented Nov 27, 2022

@jnan806 , @sczyh30 I reached a point that k8s operator automatically generate its own Makefile, and grpc/protobuf needs another Makefile. In order accomodate both maybe the project folder structure should change. But I'm not in position to propose/foresee such changes. Are you willing to review this contribution? Or should I abandon it?

@jnan806
Copy link
Collaborator

jnan806 commented Nov 28, 2022

In order accomodate both maybe the project folder structure should change. But I'm not in position to propose/foresee such changes. Are you willing to review this contribution? Or should I abandon it?

The Makefile generated by operator-sdk is a template for universal project, not for all projects. Every project can modify it by self to adjust the actual demands in project.
So I think we can accomodate both by modify the generated Makefile template according to project.

@jnan806 jnan806 requested a review from sczyh30 December 2, 2022 01:14
@joaoepj
Copy link
Author

joaoepj commented Dec 6, 2022

@jnan806, @sczyh30

Now, typing make help the Makefile outputs additional recipes:

protoc Download protoc locally if necessary.
proto Generate protobuf/gRPC interface code
proto-gen-go Download proto-gen-go locally if necessary.
proto-gen-go-grpc Download proto-gen-go locally if necessary.

make proto installs protoc, proto-gen-go and proto-gen-go-grpc and generates protobuf code.

@joaoepj
Copy link
Author

joaoepj commented Dec 12, 2022

@jnan806, Can you review my humble contribution? I would appreciate! 謝謝

@joaoepj joaoepj closed this by deleting the head repository Mar 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/build-release Category issues or PRs related to build and release the control plane.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Makefile
4 participants