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 rfc for pipectl init #4672

Merged
merged 2 commits into from
Dec 8, 2023
Merged

Conversation

ouchi2501
Copy link
Contributor

What this PR does / why we need it:

Add init to the pipectl command.
See below for Discussion.
#4635

Which issue(s) this PR fixes:

Fixes #

Does this PR introduce a user-facing change?:

  • How are users affected by this change:
  • Is this breaking change:
  • How to migrate (if breaking change):

Copy link

codecov bot commented Nov 14, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (2501848) 30.84% compared to head (a0824bd) 30.82%.

❗ Current head a0824bd differs from pull request most recent head 29d31c5. Consider uploading reports for the commit 29d31c5 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4672      +/-   ##
==========================================
- Coverage   30.84%   30.82%   -0.02%     
==========================================
  Files         221      221              
  Lines       25993    25935      -58     
==========================================
- Hits         8018     7995      -23     
+ Misses      17325    17290      -35     
  Partials      650      650              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@kentakozuka
Copy link
Member

Is it only app.pipecd.yaml that the first step(1. Create a configuration file from scratch) creates?

@ouchi2501
Copy link
Contributor Author

#4672 (comment)
@kentakozuka
Yes, Only app.pipecd.yaml

@kentakozuka
Copy link
Member

kentakozuka commented Nov 17, 2023

As you mentions here, would it be better to generate app.pipecd.yaml from applications's configs?
I input configs in example and PipeCD's GPT output is the following. Looks not bad. WDYT?

apiVersion: pipecd.dev/v1beta1
kind: KubernetesApp
spec:
  input:
    # Specify the namespace if needed; otherwise, PipeCD deploys to the default namespace
    namespace: default
    kubernetes:
      manifests:
        - deployment.yaml
        - service.yaml
  pipeline:
    stages:
      # The primary deployment rollout
      - name: K8S_PRIMARY_ROLLOUT
      # The stage for manual approval (if needed)
      - name: WAIT_APPROVAL
      # The canary deployment rollout
      - name: K8S_CANARY_ROLLOUT
        with:
          replicas: 50% # Adjust the percentage as required
      # The cleanup stage for the canary deployment
      - name: K8S_CANARY_CLEAN
  trafficRouting:
    method: pod
    kubernetes:
      primary:
        labels:
          pipecd.dev/variant: primary
      canary:
        labels:
          pipecd.dev/variant: canary

Or applications all configs are created by pipectl based on the answers 🤔

@ouchi2501
Copy link
Contributor Author

I think it should have both features.
As for pipectl init, I think it would be less confusing for users if it was created as a general interactive init command rather than relying solely on GPT from the start!
However, I also think the ability to create a config from the application config through GPT would be very nice!
I think it would be nice to have the ability to create a config from the application config via GPT as an option for pipectl init!

@kentakozuka
Copy link
Member

@ouchi2501 Sounds very cool! Let's stick with your plan :)

@ffjlabo ffjlabo force-pushed the add-rfc-pipectrl-init branch from a0824bd to 29d31c5 Compare December 8, 2023 06:34
@ouchi2501 ouchi2501 requested a review from t-kikuc as a code owner December 8, 2023 06:34
@khanhtc1202 khanhtc1202 enabled auto-merge (squash) December 8, 2023 06:35
@khanhtc1202 khanhtc1202 merged commit 301e367 into pipe-cd:master Dec 8, 2023
11 checks passed
@ouchi2501 ouchi2501 deleted the add-rfc-pipectrl-init branch December 8, 2023 06:49
sZma5a pushed a commit to sZma5a/pipecd that referenced this pull request Dec 17, 2023
* Add rfc for pipectl init

Signed-off-by: uncle <[email protected]>

* fix typo

Signed-off-by: uncle <[email protected]>

---------

Signed-off-by: uncle <[email protected]>
sZma5a pushed a commit to sZma5a/pipecd that referenced this pull request Dec 17, 2023
* Add rfc for pipectl init

Signed-off-by: uncle <[email protected]>

* fix typo

Signed-off-by: uncle <[email protected]>

---------

Signed-off-by: uncle <[email protected]>
sZma5a pushed a commit to sZma5a/pipecd that referenced this pull request Dec 17, 2023
* Add rfc for pipectl init

Signed-off-by: uncle <[email protected]>

* fix typo

Signed-off-by: uncle <[email protected]>

---------

Signed-off-by: uncle <[email protected]>
Signed-off-by: sZma5a <[email protected]>
@github-actions github-actions bot mentioned this pull request Feb 6, 2024
sZma5a pushed a commit to sZma5a/pipecd that referenced this pull request Feb 12, 2024
* Add rfc for pipectl init

Signed-off-by: uncle <[email protected]>

* fix typo

Signed-off-by: uncle <[email protected]>

---------

Signed-off-by: uncle <[email protected]>
Signed-off-by: 鈴木 優耀 <[email protected]>
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.

4 participants