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

Publish kubectl-cnpg plugin on Krew #92

Closed
mnencia opened this issue May 4, 2022 · 4 comments · Fixed by #124
Closed

Publish kubectl-cnpg plugin on Krew #92

mnencia opened this issue May 4, 2022 · 4 comments · Fixed by #124
Assignees

Comments

@mnencia
Copy link
Member

mnencia commented May 4, 2022

Currently, users need to manually download our plugin using the command line that we have in the README of the kubectl-cnpg project, but this doesn’t work well on Windows and makes it hard for users to find our plugin.

The idea is to use Krew as the official plugin distribution of Kubernetes, which seems to be the best idea.

A couple of tasks need to be done:

Write the Krew plugin manifest following this documentation, one good example is here

Test the install process locally

Manually submit the plugin to the krew-index following this documentation

Create the automated process recommended by the Kew community

After doing these tasks, there’s an interesting link that you can follow to get some stats of the plugin: stats.krew.dev

This issue was originally submitted in the EnterpriseDB ticketing system by @sxd.

@jlong49 jlong49 removed their assignment May 6, 2022
@sxd sxd self-assigned this May 6, 2022
@sxd
Copy link
Member

sxd commented May 9, 2022

No we're waiting for the PR to publish the first version on Krew which is required to publish any new version.

Here's the PR kubernetes-sigs/krew-index#2241

@sxd
Copy link
Member

sxd commented May 12, 2022

The PR was merged, but currently we will not be listed with the GitHub stars icon because we don't have the GitHub URL in the homePage field but https://cloudnative-pg.io site, probably we should add the GitHub page? this will point the users directly to the GitHub instead of the webpage and then jumping into the GitHub repo... Something to think about it, what do you think @gbartolini ?

@sxd sxd removed their assignment May 12, 2022
@leonardoce
Copy link
Contributor

It works like a charm!

❯ kubectl krew  search cnpg
NAME  DESCRIPTION                         INSTALLED
cnpg  Manage your CloudNativePG clusters  no

~ 
❯ kubectl krew install cnpg
Updated the local copy of plugin index.
Installing plugin: cnpg
Installed plugin: cnpg
\
 | Use this plugin:
 | 	kubectl cnpg
 | Documentation:
 | 	https://cloudnative-pg.io/
/
WARNING: You installed plugin "cnpg" from the krew-index plugin repository.
   These plugins are not audited for security by the Krew maintainers.
   Run them at your own risk.

~ took 7s 
❯ kubectl cnpg status cluster-example
Cluster Summary
Name:               cluster-example
Namespace:          default
System ID:          7097208531776098336
PostgreSQL Image:   ghcr.io/cloudnative-pg/postgresql:14
Primary instance:   cluster-example-1
Status:             Cluster in healthy state 
Instances:          3
Ready instances:    3
Current Write LSN:  0/5000060 (Timeline: 1 - WAL File: 000000010000000000000005)

Certificates Status
Certificate Name             Expiration Date                Days Left Until Expiration
----------------             ---------------                --------------------------
cluster-example-ca           2022-08-11 13:08:44 +0000 UTC  90.00
cluster-example-replication  2022-08-11 13:08:44 +0000 UTC  90.00
cluster-example-server       2022-08-11 13:08:44 +0000 UTC  90.00

Continuous Backup status
Not configured

Streaming Replication status
Name               Sent LSN   Write LSN  Flush LSN  Replay LSN  Write Lag  Flush Lag  Replay Lag  State      Sync State  Sync Priority
----               --------   ---------  ---------  ----------  ---------  ---------  ----------  -----      ----------  -------------
cluster-example-2  0/5000060  0/5000060  0/5000060  0/5000060   00:00:00   00:00:00   00:00:00    streaming  async       0
cluster-example-3  0/5000060  0/5000060  0/5000060  0/5000060   00:00:00   00:00:00   00:00:00    streaming  async       0

Instances status
Name               Database Size  Current LSN  Replication role  Status  QoS         Manager Version
----               -------------  -----------  ----------------  ------  ---         ---------------
cluster-example-1  33 MB          0/5000060    Primary           OK      BestEffort  1.15.0
cluster-example-2  33 MB          0/5000060    Standby (async)   OK      BestEffort  1.15.0
cluster-example-3  33 MB          0/5000060    Standby (async)   OK      BestEffort  1.15.0

Assigning it to @gbartolini to know his opinion about the consideration @sxd raised #92 (comment) about whether to set the homePage field of this repo to GitHub or to the project website.

I see many projects are listed with the stars, maybe we should do the same.

@leonardoce leonardoce assigned gbartolini and unassigned leonardoce May 13, 2022
@sxd
Copy link
Member

sxd commented May 14, 2022

@leonardoce We already discussed that with @gbartolini and @mnencia in Slack around here https://cloudnativepg.slack.com/archives/C03D68KGG65/p1652348675498369 we agree on use GitHub url as the homepage since this is the plugin =)

@sxd sxd closed this as completed in #124 May 16, 2022
mnencia pushed a commit that referenced this issue Dec 29, 2022
Signed-off-by: Jonathan Gonzalez V <jonathan.gonzalez@enterprisedb.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging a pull request may close this issue.

5 participants