-
Notifications
You must be signed in to change notification settings - Fork 17
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
Support of kustomize remotebase / git submodule #232
Comments
Hi @dan1el-k. I think #201 may have addressed this by, among other things, allowing users to pass whatever flags they want to the Argo CD repo server (which is actually invoked more as a library here). Although merged, this just has not been released yet because it's a large breaking change that is not yet documented. |
Ahh, now it makes sense. Looking forward to test the new release then :). Thanks !! |
@dan1el-k I just cut |
@krancour, just saw two weeks ago kargo 0.3.2 were release. And also begin of January v0.1.0-rc.34 were merged to main. |
Status update on this issueI did few more tests an found out that the actual functionality of using Example: apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- https://my-company-github/company-org/kargo-demo-service.git//deployment/base?timeout=120&ref=HEAD Running it from local using the
|
I got kustomize remote bases working by patching the configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: netrc-template
namespace: my-kargo
data:
.netrc: |
machine my.domain
login GITHUB_USERNAME
password ${GITHUB_TOKEN} deployment.yaml
apiVersion: kustomize.config.k8s.io/v1alpha1
kind: Component
resources:
- cm.yaml
patches:
- target:
kind: Deployment
name: kargo-controller
namespace: mercury-kargo
patch: |
apiVersion: apps/v1
kind: Deployment
metadata:
name: not-used
spec:
template:
spec:
volumes:
- name: netrc-template
configMap:
name: netrc-template
items:
- key: .netrc
path: .netrc
- name: netrc
emptyDir: {}
initContainers:
- name: init-netrc
image: busybox
resources:
limits:
cpu: 1
memory: 768Mi
requests:
cpu: 100m
memory: 512Mi
volumeMounts:
- name: netrc-template
mountPath: /mnt/template
- name: netrc
mountPath: /mnt/netrc
env:
- name: GITHUB_TOKEN
valueFrom:
secretKeyRef:
name: github-token
key: password
command:
- sh
- -c
- |
cp /mnt/template/.netrc /mnt/netrc/.netrc &&
sed -i 's/\${GITHUB_TOKEN}/'$GITHUB_TOKEN'/g' /mnt/netrc/.netrc
containers:
- name: controller
volumeMounts:
- name: netrc
readOnly: true
mountPath: /.netrc
subPath: .netrc
env:
- name: GITHUB_TOKEN
valueFrom:
secretKeyRef:
name: github-token
key: password
command:
- /usr/local/bin/kargo
- controller |
Issue
Currently kargo-render uses a flag
--load-restrictor LoadRestrictionsRootOnly
in case of kustomize, which actually blocks the usage ofkustomize remote bases
orkustomize remote components
.Error
Proposal
kustomize remote base
orremote components
by using kustomize flag--load-restrictor LoadRestrictionsNone
git submodules
as an equivalent way to render manifests into another repo.The text was updated successfully, but these errors were encountered: