Skip to content

Commit

Permalink
ci: fix helm chart issues
Browse files Browse the repository at this point in the history
  • Loading branch information
dvirgilad committed Aug 21, 2024
1 parent ab38e83 commit b1340e2
Show file tree
Hide file tree
Showing 12 changed files with 25 additions and 24 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: {{ include "rcs-ocm-addons.fullname" . }}-addon
name: {{ include "rcs-ocm-addons.fullname" . }}-score-addon
labels:
{{- include "rcs-ocm-addons.labels" . | nindent 4 }}
rules:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: {{ include "rcs-ocm-addons.fullname" . }}-addon
name: {{ include "rcs-ocm-addons.fullname" . }}-score-addon
labels:
{{- include "rcs-ocm-addons.labels" . | nindent 4 }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: {{ include "rcs-ocm-addons.fullname" . }}-addon
name: {{ include "rcs-ocm-addons.fullname" . }}-score-addon
subjects:
- kind: ServiceAccount
name: {{ include "rcs-ocm-addons.fullname" . }}-addon-sa
name: {{ include "rcs-ocm-addons.fullname" . }}-score-addon-sa
namespace: {{ .Release.Namespace }}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: addon.open-cluster-management.io/v1alpha1
kind: ClusterManagementAddOn
metadata:
name: {{ include "rcs-ocm-addons.fullname" . }}-rcs-score
name: rcs-score
labels:
{{- include "rcs-ocm-addons.labels" . | nindent 4 }}
annotations:
Expand Down
8 changes: 4 additions & 4 deletions charts/rcs-ocm-addons/templates/score-addon/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@ kind: Deployment
metadata:
name: {{ include "rcs-ocm-addons.fullname" . }}-score-addon-manager
labels:
app: rcs-score-addon-manager
app: {{ include "rcs-ocm-addons.fullname" . }}-score-addon-manager
{{- include "rcs-ocm-addons.labels" . | nindent 4 }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
app: rcs-score-addon-manager
app: {{ include "rcs-ocm-addons.fullname" . }}-score-addon-manager
{{- include "rcs-ocm-addons.selectorLabels" . | nindent 6 }}
template:
metadata:
labels:
app: rcs-score-addon-manager
app: {{ include "rcs-ocm-addons.fullname" . }}-score-addon-manager
{{- include "rcs-ocm-addons.selectorLabels" . | nindent 8 }}
spec:
securityContext:
Expand Down Expand Up @@ -49,4 +49,4 @@ spec:
env:
- name: ADDON_IMAGE
value: {{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}
serviceAccountName: {{ include "rcs-ocm-addons.fullname" . }}-addon-sa
serviceAccountName: {{ include "rcs-ocm-addons.fullname" . }}-score-addon-sa
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ include "rcs-ocm-addons.fullname" . }}-addon-sa
name: {{ include "rcs-ocm-addons.fullname" . }}-score-addon-sa
labels:
{{- include "rcs-ocm-addons.labels" . | nindent 4 }}
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ roleRef:
name: {{ include "rcs-ocm-addons.fullname" . }}-capp-status-addon
subjects:
- kind: ServiceAccount
name: {{ include "rcs-ocm-addons.fullname" . }}-sa
name: {{ include "rcs-ocm-addons.fullname" . }}-capp-status-sa
namespace: {{ .Release.Namespace }}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: addon.open-cluster-management.io/v1alpha1
kind: ClusterManagementAddOn
metadata:
name: {{ include "rcs-ocm-addons.fullname" . }}-capp-status-addon
name: capp-status-addon
labels:
{{- include "rcs-ocm-addons.labels" . | nindent 4 }}
annotations:
Expand Down
16 changes: 8 additions & 8 deletions charts/rcs-ocm-addons/templates/status-addon/deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "rcs-ocm-addons.fullname" . }}-status-addon-manager
name: capp-status-addon-manager
labels:
app: rcs-score-addon-manager
app: capp-status-addon-manager
{{- include "rcs-ocm-addons.labels" . | nindent 4 }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
app: rcs-score-addon-manager
app: capp-status-addon-manager
{{- include "rcs-ocm-addons.selectorLabels" . | nindent 6 }}
template:
metadata:
labels:
app: rcs-score-addon-manager
app: capp-status-addon-manager
{{- include "rcs-ocm-addons.selectorLabels" . | nindent 8 }}
spec:
securityContext:
Expand All @@ -26,15 +26,15 @@ spec:
affinity:
{{- toYaml .Values.affinity | nindent 8 }}
containers:
- name: rcs-score-addon-manager
- name: rcs-status-addon-manager
image: {{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
command:
{{- range .Values.manager.score.command }}
{{- range .Values.manager.status.command }}
- {{ . | quote }}
{{- end }}
args:
{{- range .Values.manager.score.args }}
{{- range .Values.manager.status.args }}
- {{ . | quote }}
{{- end }}
securityContext:
Expand All @@ -49,4 +49,4 @@ spec:
env:
- name: ADDON_IMAGE
value: {{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}
serviceAccountName: {{ include "rcs-ocm-addons.fullname" . }}-addon-sa
serviceAccountName: {{ include "rcs-ocm-addons.fullname" . }}-capp-status-sa
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ include "rcs-ocm-addons.fullname" . }}-sa
name: {{ include "rcs-ocm-addons.fullname" . }}-capp-status-sa
labels:
{{- include "rcs-ocm-addons.labels" . | nindent 4 }}
2 changes: 1 addition & 1 deletion charts/rcs-ocm-addons/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ installStrategy:
- configs:
- group: addon.open-cluster-management.io
name: rcs-score-deploy-config
namespace: open-cluster-management-hu
namespace: open-cluster-management-hub
resource: addondeploymentconfigs
name: all-clusters
namespace: test
Expand Down
3 changes: 2 additions & 1 deletion score/scorehub/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,15 @@ import (
)

const (
addonImageDefault = "ghcr.io/dana-team/rcs-ocm-deployer:main"
addonImageDefault = "ghcr.io/dana-team/rcs-ocm-addons:main"
AddonName = "rcs-score"
templatePath = "manifests/templates"
agentInstallationNamespace = "open-cluster-management-agent-addon"
)

//go:embed manifests
//go:embed manifests/templates

var fs embed.FS

var agentPermissionFiles = []string{
Expand Down
2 changes: 1 addition & 1 deletion status/statushub/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const (
templatePath = "manifests/templates"
agentNameLength = 5
agentInstallNameSpace = "open-cluster-management-agent-addon"
addonImageDefault = "ghcr.io/dana-team/rcs-ocm-deployer:main"
addonImageDefault = "ghcr.io/dana-team/rcs-ocm-addons:main"
)

//go:embed manifests
Expand Down

0 comments on commit b1340e2

Please sign in to comment.