Skip to content

Conversation

@ElderMatt
Copy link
Contributor

📌 Summary

Replaces secrets withs secretRefs for Harbor and Oauth2-Proxy.

Uses environment Variables for Loki.

Comment on lines 24 to 29
{{- if eq $obj.type "linode" }}
S3_URL: "https://{{ $obj.linode.accessKeyId }}:{{ $obj.linode.secretAccessKey }}@{{ $obj.linode.region }}.linodeobjects.com/{{ $obj.linode.buckets.loki }}"
{{- end }}
{{- if eq $obj.type "minioLocal" }}
S3_URL: "http://otomi-admin:{{ $v.otomi.adminPassword }}@minio.minio.svc.cluster.local:9000/loki"
{{- end }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As the main objective is delegating this to Sealed Secrets, the templating would be better left in the loki.gotmpl. Therefore, accessKey and secretAccessKey / adminPassword (for minio) should be stored in one variable each. region and the bucket name are not sensitive values.

aws:
{{- if eq $obj.type "minioLocal" }}
s3: http://otomi-admin:{{ $v.otomi.adminPassword }}@minio.minio.svc.cluster.local.:9000/loki
s3: ${S3_URL}
Copy link
Contributor

@merll merll Dec 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As mentioned above, probably something like

s3: http://otomi-admin:${OTOMI_ADMIN_PASSWORD}@minio.minio.svc.cluster.local.:9000/loki

and

s3: https://${S3_ACCESS_KEY_ID}:${S3_ACCESS_KEY_SECRET}@{{ $obj.linode.region }}.linodeobjects.com/{{ $obj.linode.buckets.loki }}

merll
merll previously requested changes Dec 17, 2025
Copy link
Contributor

@merll merll left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requested changes as current implementation does not seem to work well when moving on to sealed secrets.

@ElderMatt ElderMatt requested a review from merll December 18, 2025 13:14
@ElderMatt ElderMatt requested a review from CasLubbers December 19, 2025 08:20

resources: {{- $h.resources.core | toYaml | nindent 4 }}
secret: {{ $h | get "core.secret" nil | quote }}
existingSecretKey: harbor-core-secret-key
Copy link
Contributor

@j-zimnowoda j-zimnowoda Dec 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

core.existingSecretKey does not exist in the Harbor helm chart. Did you mean core.secretName?

We have not set it before because we are relying on istio mTLS. What is the reason you decided to se it now?

Copy link
Contributor

@j-zimnowoda j-zimnowoda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left one inline comment.

While running bin/compare.sh script I noticed that few Loki secretRefs are set to null which does not seem to be right.

spec.template.spec.containers.compactor
  + one map entry added:
    envFrom:
    - name: loki-s3-linode-credentials
    │ secretRef: null


data.config.yaml
  ± value change in multiline text (one insert, one deletion)
    -     s3: https://someaccessKeyId:[email protected]/my-clusterid-loki
    +     s3: https://${S3_ACCESS_KEY_ID}:${S3_ACCESS_KEY_SECRET}@nl-ams-1.linodeobjects.com/my-clusterid-loki



spec.template.spec.containers.distributor
  + one map entry added:
    envFrom:
    - name: loki-s3-linode-credentials
    │ secretRef: null


spec.template.spec.containers.ingester
  + one map entry added:
    envFrom:
    - name: loki-s3-linode-credentials
    │ secretRef: null


spec.template.spec.containers.querier
  + one map entry added:
    envFrom:
    - name: loki-s3-linode-credentials
    │ secretRef: null


spec.template.spec.containers.query-frontend
  + one map entry added:
    envFrom:
    - name: loki-s3-linode-credentials
    │ secretRef: null

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.

6 participants