forked from dimatha/adcs-issuer
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #31 from djkormo/chart-test-3
adding misssing directory for chart
- Loading branch information
Showing
18 changed files
with
839 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,6 @@ | |
*.so | ||
*.dylib | ||
bin | ||
adcs-issuer | ||
# Test binary, build with `go test -c` | ||
*.test | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Patterns to ignore when building packages. | ||
# This supports shell glob matching, relative path matching, and | ||
# negation (prefixed with !). Only one pattern per line. | ||
.DS_Store | ||
# Common VCS dirs | ||
.git/ | ||
.gitignore | ||
.bzr/ | ||
.bzrignore | ||
.hg/ | ||
.hgignore | ||
.svn/ | ||
# Common backup files | ||
*.swp | ||
*.bak | ||
*.tmp | ||
*.orig | ||
*~ | ||
# Various IDEs | ||
.project | ||
.idea/ | ||
*.tmproj | ||
.vscode/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
apiVersion: v2 | ||
name: adcs-issuer | ||
description: ADCS issuser plugin for cert-manager | ||
# A chart can be either an 'application' or a 'library' chart. | ||
# | ||
# Application charts are a collection of templates that can be packaged into versioned archives | ||
# to be deployed. | ||
# | ||
# Library charts provide useful utilities or functions for the chart developer. They're included as | ||
# a dependency of application charts to inject those utilities and functions into the rendering | ||
# pipeline. Library charts do not define any templates and therefore cannot be deployed. | ||
type: application | ||
# This is the chart version. This version number should be incremented each time you make changes | ||
# to the chart and its templates, including the app version. | ||
# Versions are expected to follow Semantic Versioning (https://semver.org/) | ||
version: 2.0.4 | ||
# This is the version number of the application being deployed. This version number should be | ||
# incremented each time you make changes to the application. Versions are not expected to | ||
# follow Semantic Versioning. They should reflect the version the application is using. | ||
# It is recommended to use it with quotes. | ||
appVersion: "2.0.4" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
{{/* | ||
Expand the name of the chart. | ||
*/}} | ||
{{- define "chart.name" -}} | ||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} | ||
{{- end }} | ||
|
||
{{/* | ||
Create a default fully qualified app name. | ||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). | ||
If release name contains chart name it will be used as a full name. | ||
*/}} | ||
{{- define "chart.fullname" -}} | ||
{{- if .Values.fullnameOverride }} | ||
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} | ||
{{- else }} | ||
{{- $name := default .Chart.Name .Values.nameOverride }} | ||
{{- if contains $name .Release.Name }} | ||
{{- .Release.Name | trunc 63 | trimSuffix "-" }} | ||
{{- else }} | ||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} | ||
{{- end }} | ||
{{- end }} | ||
{{- end }} | ||
|
||
{{/* | ||
Create chart name and version as used by the chart label. | ||
*/}} | ||
{{- define "chart.chart" -}} | ||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} | ||
{{- end }} | ||
|
||
{{/* | ||
Common labels | ||
*/}} | ||
{{- define "chart.labels" -}} | ||
helm.sh/chart: {{ include "chart.chart" . }} | ||
{{ include "chart.selectorLabels" . }} | ||
{{- if .Chart.AppVersion }} | ||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} | ||
{{- end }} | ||
app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
{{- end }} | ||
|
||
{{/* | ||
Selector labels | ||
*/}} | ||
{{- define "chart.selectorLabels" -}} | ||
app.kubernetes.io/name: {{ include "chart.name" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
{{- end }} | ||
|
||
{{/* | ||
Create the name of the service account to use | ||
*/}} | ||
{{- define "chart.serviceAccountName" -}} | ||
{{- if .Values.serviceAccount.create }} | ||
{{- default (include "chart.fullname" .) .Values.serviceAccount.name }} | ||
{{- else }} | ||
{{- default "default" .Values.serviceAccount.name }} | ||
{{- end }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
apiVersion: apiextensions.k8s.io/v1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
name: adcsissuers.adcs.certmanager.csf.nokia.com | ||
annotations: | ||
cert-manager.io/inject-ca-from: {{ .Release.Namespace }}/{{ include "chart.fullname" . }}- | ||
controller-gen.kubebuilder.io/version: v0.7.0 | ||
labels: | ||
{{- include "chart.labels" . | nindent 4 }} | ||
spec: | ||
group: adcs.certmanager.csf.nokia.com | ||
names: | ||
kind: AdcsIssuer | ||
listKind: AdcsIssuerList | ||
plural: adcsissuers | ||
singular: adcsissuer | ||
scope: Namespaced | ||
versions: | ||
- name: v1 | ||
schema: | ||
openAPIV3Schema: | ||
description: AdcsIssuer is the Schema for the adcsissuers API | ||
properties: | ||
apiVersion: | ||
description: 'APIVersion defines the versioned schema of this representation | ||
of an object. Servers should convert recognized schemas to the latest | ||
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' | ||
type: string | ||
kind: | ||
description: 'Kind is a string value representing the REST resource this | ||
object represents. Servers may infer this from the endpoint the client | ||
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' | ||
type: string | ||
metadata: | ||
type: object | ||
spec: | ||
description: AdcsIssuerSpec defines the desired state of AdcsIssuer | ||
properties: | ||
caBundle: | ||
description: CABundle is a PEM encoded TLS certifiate to use to verify | ||
connections to the ADCS server. | ||
format: byte | ||
type: string | ||
credentialsRef: | ||
description: CredentialsRef is a reference to a Secret containing the | ||
username and password for the ADCS server. The secret must contain | ||
two keys, 'username' and 'password'. | ||
properties: | ||
name: | ||
description: Name of the referent. | ||
type: string | ||
required: | ||
- name | ||
type: object | ||
retryInterval: | ||
description: How often to retry in case of communication errors (in | ||
time.ParseDuration() format) Default 1 hour. | ||
type: string | ||
statusCheckInterval: | ||
description: How often to check for request status in the server (in | ||
time.ParseDuration() format) Default 6 hours. | ||
type: string | ||
templateName: | ||
description: Which ADCS Template should this issuer use Defaults to | ||
the what is specified in main.go or as an cli option. | ||
type: string | ||
url: | ||
description: URL is the base URL for the ADCS instance | ||
type: string | ||
required: | ||
- credentialsRef | ||
- url | ||
type: object | ||
status: | ||
description: AdcsIssuerStatus defines the observed state of AdcsIssuer | ||
type: object | ||
type: object | ||
served: true | ||
storage: true | ||
subresources: | ||
status: {} | ||
status: | ||
acceptedNames: | ||
kind: "" | ||
plural: "" | ||
conditions: [] | ||
storedVersions: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
apiVersion: apiextensions.k8s.io/v1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
name: adcsrequests.adcs.certmanager.csf.nokia.com | ||
annotations: | ||
cert-manager.io/inject-ca-from: {{ .Release.Namespace }}/{{ include "chart.fullname" . }}- | ||
controller-gen.kubebuilder.io/version: v0.7.0 | ||
labels: | ||
{{- include "chart.labels" . | nindent 4 }} | ||
spec: | ||
group: adcs.certmanager.csf.nokia.com | ||
names: | ||
kind: AdcsRequest | ||
listKind: AdcsRequestList | ||
plural: adcsrequests | ||
singular: adcsrequest | ||
scope: Namespaced | ||
versions: | ||
- additionalPrinterColumns: | ||
- jsonPath: .status.state | ||
name: State | ||
type: string | ||
name: v1 | ||
schema: | ||
openAPIV3Schema: | ||
description: AdcsRequest is the Schema for the adcsrequests API | ||
properties: | ||
apiVersion: | ||
description: 'APIVersion defines the versioned schema of this representation | ||
of an object. Servers should convert recognized schemas to the latest | ||
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' | ||
type: string | ||
kind: | ||
description: 'Kind is a string value representing the REST resource this | ||
object represents. Servers may infer this from the endpoint the client | ||
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' | ||
type: string | ||
metadata: | ||
type: object | ||
spec: | ||
description: AdcsRequestSpec defines the desired state of AdcsRequest | ||
properties: | ||
csr: | ||
description: Certificate signing request bytes in PEM encoding. This | ||
will be used when finalizing the request. This field must be set on | ||
the request. | ||
format: byte | ||
type: string | ||
issuerRef: | ||
description: IssuerRef references a properly configured AdcsIssuer which | ||
should be used to serve this AdcsRequest. If the Issuer does not exist, | ||
processing will be retried. If the Issuer is not an 'ADCS' Issuer, | ||
an error will be returned and the ADCSRequest will be marked as failed. | ||
properties: | ||
group: | ||
description: Group of the resource being referred to. | ||
type: string | ||
kind: | ||
description: Kind of the resource being referred to. | ||
type: string | ||
name: | ||
description: Name of the resource being referred to. | ||
type: string | ||
required: | ||
- name | ||
type: object | ||
required: | ||
- csr | ||
- issuerRef | ||
type: object | ||
status: | ||
description: AdcsRequestStatus defines the observed state of AdcsRequest | ||
properties: | ||
id: | ||
description: ID of the Request assigned by the ADCS. This will initially | ||
be empty when the resource is first created. The ADCSRequest controller | ||
will populate this field when the Request is accepted by ADCS. This | ||
field will be immutable after it is initially set. | ||
type: string | ||
reason: | ||
description: Reason optionally provides more information about a why | ||
the AdcsRequest is in the current state. | ||
type: string | ||
state: | ||
description: State contains the current state of this ADCSRequest resource. | ||
States 'ready' and 'rejected' are 'final' | ||
enum: | ||
- pending | ||
- ready | ||
- errored | ||
- rejected | ||
type: string | ||
type: object | ||
type: object | ||
served: true | ||
storage: true | ||
subresources: | ||
status: {} | ||
status: | ||
acceptedNames: | ||
kind: "" | ||
plural: "" | ||
conditions: [] | ||
storedVersions: [] |
31 changes: 31 additions & 0 deletions
31
...-issuer/templates/cert-manager-controller-approve-dcs-certmanager-csf-nokia-com-rbac.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRole | ||
metadata: | ||
name: {{ include "chart.fullname" . }}-cert-manager-controller-approve:adcs-certmanager-csf-nokia-com | ||
labels: | ||
{{- include "chart.labels" . | nindent 4 }} | ||
rules: | ||
- apiGroups: | ||
- cert-manager.io | ||
resourceNames: | ||
- adcsissuers.adcs.certmanager.csf.nokia.com/* | ||
- clusteradcsissuers.adcs.certmanager.csf.nokia.com/* | ||
resources: | ||
- signers | ||
verbs: | ||
- approve | ||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRoleBinding | ||
metadata: | ||
name: {{ include "chart.fullname" . }}-cert-manager-controller-approve:adcs-certmanager-csf-nokia-com | ||
labels: | ||
{{- include "chart.labels" . | nindent 4 }} | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: ClusterRole | ||
name: '{{ include "chart.fullname" . }}-cert-manager-controller-approve:adcs-certmanager-csf-nokia-com' | ||
subjects: | ||
- kind: ServiceAccount | ||
name: '{{ include "chart.fullname" . }}-cert-manager' | ||
namespace: '{{ .Release.Namespace }}' |
Oops, something went wrong.