Skip to content

Commit

Permalink
addressing comments from rohit and josh
Browse files Browse the repository at this point in the history
  • Loading branch information
gehrkefc committed Feb 14, 2025
1 parent 6131f6d commit cb3a9cd
Show file tree
Hide file tree
Showing 6 changed files with 178 additions and 17 deletions.
152 changes: 152 additions & 0 deletions charts/helm.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
NAME: remotedialer-proxy-1739213884
LAST DEPLOYED: Mon Feb 10 15:58:04 2025
NAMESPACE: default
STATUS: pending-install
REVISION: 1
TEST SUITE: None
USER-SUPPLIED VALUES:
{}

COMPUTED VALUES:
apiExtensionName: ""
fullnameOverride: ""
image:
pullPolicy: IfNotPresent
repository: rancher
tag: latest
imagePullSecrets: []
nameOverride: ""
namespaceOverride: ""
replicaCount: 1
roleOverride: ""
service:
caName: api-extension-ca-name
certCAName: api-extension-ca
httpsPort: 0
peerPort: 0
proxyPort: 0
secret: api-extension
tlsName: api-extension-tls-name
type: ClusterIP
serviceAccount:
name: ""

HOOKS:
MANIFEST:
---
# Source: remotedialer-proxy/templates/serviceaccount.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
name: api-extension-sa
namespace: cattle-system
---
# Source: remotedialer-proxy/templates/role.yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: api-extension-role
namespace: cattle-system
rules:
- apiGroups: [""]
resources: ["secrets"]
verbs: ["get", "create", "update"]
---
# Source: remotedialer-proxy/templates/rolebinding.yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: api-extension-role-binding
namespace: cattle-system
subjects:
- kind: ServiceAccount
name: api-extension-sa
namespace: cattle-system
roleRef:
kind: Role
name: api-extension-role
apiGroup: rbac.authorization.k8s.io
---
# Source: remotedialer-proxy/templates/service.yaml
apiVersion: v1
kind: Service
metadata:
name: remotedialer-proxy
labels:
helm.sh/chart: remotedialer-proxy-0.0.1
app.kubernetes.io/version: "0.0.1"
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: remotedialer-proxy
app.kubernetes.io/instance: remotedialer-proxy-1739213884
app: api-extension
namespace: cattle-system
spec:
type: ClusterIP
ports:
- port: 8443
targetPort: https
protocol: TCP
name: https
- port: 6666
targetPort: proxy
protocol: TCP
name: proxy
selector:
app.kubernetes.io/name: remotedialer-proxy
app.kubernetes.io/instance: remotedialer-proxy-1739213884
app: api-extension
---
# Source: remotedialer-proxy/templates/deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: remotedialer-proxy-1739213884
namespace: cattle-system
spec:
replicas: 1
selector:
matchLabels:
app.kubernetes.io/name: remotedialer-proxy
app.kubernetes.io/instance: remotedialer-proxy-1739213884
app: api-extension
template:
metadata:
labels:
helm.sh/chart: remotedialer-proxy-0.0.1
app.kubernetes.io/version: "0.0.1"
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: remotedialer-proxy
app.kubernetes.io/instance: remotedialer-proxy-1739213884
app: api-extension
creationTimestamp: null
spec:
serviceAccountName: api-extension-sa
containers:
- name: remotedialer-proxy
image: "rancher/remotedialer-proxy:latest"
imagePullPolicy: IfNotPresent
ports:
- name: https
containerPort: 8443
protocol: TCP
- name: proxy
containerPort: 6666
protocol: TCP
env:
- name: CERT_CA_NAME
value: api-extension-ca
- name: TLS_NAME
value: api-extension-tls-name
- name: CA_NAME
value: api-extension-ca-name
- name: CERT_CA_NAMESPACE
value: cattle-system
- name: SECRET
value: api-extension
- name: HTTPS_PORT
value: "8443"
- name: PROXY_PORT
value: "6666"
- name: PEER_PORT
value: "5555"

4 changes: 2 additions & 2 deletions charts/remotedialer-proxy/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
apiVersion: v2
name: remotedialer-proxy
description: A Helm chart for Kubernetes
description: creates a bridge between k8s api-server and imperative api when Rancher is outside of the cluster
type: application
version: 0.0.1
appVersion: "0.0.1"
appVersion: 0.0.1
annotations:
catalog.cattle.io/certified: rancher
catalog.cattle.io/hidden: "true"
Expand Down
12 changes: 10 additions & 2 deletions charts/remotedialer-proxy/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
{{- define "system_default_registry" -}}
{{- if .Values.global.cattle.systemDefaultRegistry -}}
{{- printf "%s/" .Values.global.cattle.systemDefaultRegistry -}}
{{- else -}}
{{- "" -}}
{{- end -}}
{{- end -}}

{{/*
API Extension Name - To be used in other variables
*/}}
Expand Down Expand Up @@ -44,7 +52,7 @@ Selector labels
{{- define "remotedialer-proxy.selectorLabels" -}}
app.kubernetes.io/name: {{ include "remotedialer-proxy.name" . }}
app.kubernetes.io/instance: {{ include "api-extension.name" . }}
app: api-extension
app: {{ include "api-extension.name" . }}
{{- end }}

{{/*
Expand All @@ -65,5 +73,5 @@ Role to use
Role Binding to use
*/}}
{{- define "remotedialer-proxy.rolebinding" -}}
{{- default (include "remotedialer-proxy.role" .) (include "api-extension.name" .) }}
{{- include "api-extension.name" . }}
{{- end }}
13 changes: 6 additions & 7 deletions charts/remotedialer-proxy/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ spec:
{{- with .Values.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
creationTimestamp: null
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
Expand All @@ -28,14 +27,14 @@ spec:
serviceAccountName: {{ include "remotedialer-proxy.serviceAccountName" . }}
containers:
- name: {{ include "remotedialer-proxy.name" . }}
image: "{{ .Values.image.repository }}{{print "/" .Chart.Name }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
image: {{ template "system_default_registry" $ }}{{ $.Values.image.repository }}{{print "/" .Chart.Name }}:{{default .Chart.AppVersion .Values.image.tag }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- name: https
containerPort: {{ default 8443 .Values.service.httpsPort }}
containerPort: {{ .Values.service.httpsPort }}
protocol: TCP
- name: proxy
containerPort: {{ default 6666 .Values.service.proxyPort }}
containerPort: {{ .Values.service.proxyPort }}
protocol: TCP
env:
- name: CERT_CA_NAME
Expand All @@ -49,8 +48,8 @@ spec:
- name: SECRET
value: {{ .Values.service.secret }}
- name: HTTPS_PORT
value: {{ default 8443 .Values.service.httpsPort | quote }}
value: {{ .Values.service.httpsPort | quote }}
- name: PROXY_PORT
value: {{ default 6666 .Values.service.proxyPort | quote }}
value: {{ .Values.service.proxyPort | quote }}
- name: PEER_PORT
value: {{ default 8888 .Values.service.peerPort | quote }}
value: {{ .Values.service.peerPort | quote }}
4 changes: 2 additions & 2 deletions charts/remotedialer-proxy/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ metadata:
spec:
type: {{ .Values.service.type }}
ports:
- port: {{ default 8443 .Values.service.httpsPort }}
- port: {{ .Values.service.httpsPort }}
targetPort: https
protocol: TCP
name: https
- port: {{ default 6666 .Values.service.proxyPort }}
- port: {{ .Values.service.proxyPort }}
targetPort: proxy
protocol: TCP
name: proxy
Expand Down
10 changes: 6 additions & 4 deletions charts/remotedialer-proxy/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ image:

imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""
namespaceOverride: ""
roleOverride: ""
apiExtensionName: ""
Expand All @@ -22,12 +21,15 @@ serviceAccount:

service:
type: ClusterIP
httpsPort: 0
proxyPort: 0
peerPort: 0
httpsPort: 8443
proxyPort: 6666
peerPort: 8888
secret: "api-extension"
caName: "api-extension-ca-name"
certCAName: "api-extension-cert-ca-name"
tlsName: "api-extension-tls-name"
certCAName: "api-extension-ca"

global:
cattle:
systemDefaultRegistry: ""

0 comments on commit cb3a9cd

Please sign in to comment.