Skip to content

Generate certificate suitable for use with any Kubernetes Webhook. #1805

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

Merged
merged 1 commit into from
Sep 27, 2022
Merged

Generate certificate suitable for use with any Kubernetes Webhook. #1805

merged 1 commit into from
Sep 27, 2022

Conversation

muicoder
Copy link
Contributor

Generate certificate suitable for use with any Kubernetes Mutating Webhook.
This script uses k8s' CertificateSigningRequest API to generate a certificate signed by k8s CA suitable for use with any Kubernetes Mutating Webhook service pod.
This requires permissions to create and approve CSR. See: https://kubernetes.io/docs/tasks/tls/managing-tls-in-a-cluster for detailed explanation and additional instructions.
The server key/cert k8s CA cert are stored in a k8s secret.
usage: ./scripts/generate_certificate.sh [OPTIONS]
The following flags are required.
    --service          Service name of webhook.
    --webhook          Webhook config name.
    --namespace        Namespace where webhook service and secret reside.
    --secret           Secret for CA certificate and server certificate/key pair.
The following flags are optional.
    --webhook-kind     Webhook kind, either MutatingWebhookConfiguration or
                       ValidatingWebhookConfiguration (defaults to MutatingWebhookConfiguration)

@codecov
Copy link

codecov bot commented Sep 27, 2022

Codecov Report

Base: 57.94% // Head: 57.94% // No change to project coverage 👍

Coverage data is based on head (e2c0bc0) compared to base (6b59e6e).
Patch has no changes to coverable lines.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1805   +/-   ##
=======================================
  Coverage   57.94%   57.94%           
=======================================
  Files           6        6           
  Lines         478      478           
=======================================
  Hits          277      277           
  Misses        184      184           
  Partials       17       17           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@fanux fanux merged commit 8444145 into labring:main Sep 27, 2022
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.

2 participants