diff --git a/.github/workflows/validate-example.yaml b/.github/workflows/validate-example.yaml new file mode 100644 index 000000000..f0f11de98 --- /dev/null +++ b/.github/workflows/validate-example.yaml @@ -0,0 +1,52 @@ +name: Validate Examples + +on: + pull_request: + branches: + - master + push: + branches: + - master + +jobs: + validate-examples: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Install yamllint + run: sudo apt-get install -y yamllint + + - name: Lint YAML files + run: yamllint --strict ./example + + - name: Install kubectl + run: | + curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" + chmod +x kubectl + sudo mv kubectl /usr/local/bin/ + + - name: Create k8s Kind Cluster + uses: helm/kind-action@v1.5.0 + with: + cluster_name: kind + + - name: Apply CRD + run: | + for crd in $(find ./config/crd/bases -type f -name '*.yaml'); do + kubectl create -f $crd + done + + - name: Validate CRD Installation + run: | + CRDs=("redis" "redissentinels" "redisclusters" "redisreplications") + for crd in "${CRDs[@]}"; do + kubectl get crd $crd.redis.redis.opstreelabs.in || exit 1 + done + + - name: Validate CR + run: | + for example in $(find ./example -type f -name '*.yaml'); do + kubectl apply --dry-run=server -f $example + done \ No newline at end of file diff --git a/example/v1beta1/additional_config/configmap.yaml b/example/v1beta1/additional_config/configmap.yaml index f68ea80ac..d06cec022 100644 --- a/example/v1beta1/additional_config/configmap.yaml +++ b/example/v1beta1/additional_config/configmap.yaml @@ -6,5 +6,5 @@ metadata: data: redis-additional.conf: | tcp-keepalive 400 - slowlog-max-len 158 + slowlog-max-len 158 stream-node-max-bytes 2048 diff --git a/example/v1beta1/advance_config/clusterd.yaml b/example/v1beta1/advance_config/clusterd.yaml index 305a13c19..44493e436 100644 --- a/example/v1beta1/advance_config/clusterd.yaml +++ b/example/v1beta1/advance_config/clusterd.yaml @@ -32,8 +32,8 @@ spec: resources: requests: storage: 1Gi - # nodeSelector: {} - # securityContext: {} - # priorityClassName: "" - # affinity: {} - # Tolerations: [] + # nodeSelector: {} + # securityContext: {} + # priorityClassName: "" + # affinity: {} + # Tolerations: [] diff --git a/example/v1beta1/advance_config/standalone.yaml b/example/v1beta1/advance_config/standalone.yaml index e76625154..f8d91bd74 100644 --- a/example/v1beta1/advance_config/standalone.yaml +++ b/example/v1beta1/advance_config/standalone.yaml @@ -28,8 +28,8 @@ spec: redisExporter: enabled: false image: quay.io/opstree/redis-exporter:v1.44.0 - # nodeSelector: {} - # securityContext: {} - # priorityClassName: "" - # affinity: {} - # Tolerations: [] + # nodeSelector: {} + # securityContext: {} + # priorityClassName: "" + # affinity: {} + # Tolerations: [] diff --git a/example/v1beta1/affinity/clusterd.yaml b/example/v1beta1/affinity/clusterd.yaml index 535a98fde..89ae32a8e 100644 --- a/example/v1beta1/affinity/clusterd.yaml +++ b/example/v1beta1/affinity/clusterd.yaml @@ -38,7 +38,7 @@ spec: operator: In values: - redis-cluster-follower - - redis-cluster-leader + - redis-cluster-leader topologyKey: "kubernetes.io/hostname" storage: volumeClaimTemplate: diff --git a/example/v1beta1/eks-cluster.yaml b/example/v1beta1/eks-cluster.yaml deleted file mode 100644 index 4474537e3..000000000 --- a/example/v1beta1/eks-cluster.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: eksctl.io/v1alpha5 -kind: ClusterConfig -metadata: - name: operator-testing - region: us-west-2 - version: "1.22" -managedNodeGroups: - - name: ng-1 - instanceType: t3a.medium - desiredCapacity: 3 - volumeSize: 30 - ssh: - allow: true - volumeType: gp3 -kubernetesNetworkConfig: - ipFamily: IPv4 -# ipFamily: IPv6 -addons: - - name: vpc-cni - - name: coredns - - name: kube-proxy - - name: aws-ebs-csi-driver - attachPolicyARNs: - - arn:aws:iam::aws:policy/service-role/AmazonEBSCSIDriverPolicy -iam: - withOIDC: true diff --git a/example/v1beta1/external_service/cluster-svc.yaml b/example/v1beta1/external_service/cluster-svc.yaml index 8e68ca75f..bcc2eceb4 100644 --- a/example/v1beta1/external_service/cluster-svc.yaml +++ b/example/v1beta1/external_service/cluster-svc.yaml @@ -8,17 +8,16 @@ metadata: role: leader name: redis-cluster-leaders spec: - clusterIP: 10.102.152.77 ports: - - name: redis-client - port: 6379 - protocol: TCP - targetPort: 6379 + - name: redis-client + port: 6379 + protocol: TCP + targetPort: 6379 selector: app: redis-cluster-leader redis_setup_type: cluster role: leader -# type: LoadBalancer + # type: LoadBalancer type: NodePort --- apiVersion: v1 @@ -30,15 +29,14 @@ metadata: role: follower name: redis-cluster-followers spec: - clusterIP: 10.108.109.134 ports: - - name: redis-client - port: 6379 - protocol: TCP - targetPort: 6379 + - name: redis-client + port: 6379 + protocol: TCP + targetPort: 6379 selector: app: redis-cluster-follower redis_setup_type: cluster role: follower -# type: LoadBalancer + # type: LoadBalancer type: NodePort diff --git a/example/v1beta1/external_service/replication-svc.yaml b/example/v1beta1/external_service/replication-svc.yaml index 5e412de80..0b63b380c 100644 --- a/example/v1beta1/external_service/replication-svc.yaml +++ b/example/v1beta1/external_service/replication-svc.yaml @@ -9,13 +9,13 @@ metadata: name: redis-replication spec: ports: - - name: redis-client - port: 6379 - protocol: TCP - targetPort: 6379 + - name: redis-client + port: 6379 + protocol: TCP + targetPort: 6379 selector: app: redis-replication redis_setup_type: replication role: replication -# type: LoadBalancer + # type: LoadBalancer type: NodePort diff --git a/example/v1beta1/external_service/standalone-svc.yaml b/example/v1beta1/external_service/standalone-svc.yaml index df4efe038..2c8c8aec5 100644 --- a/example/v1beta1/external_service/standalone-svc.yaml +++ b/example/v1beta1/external_service/standalone-svc.yaml @@ -9,13 +9,13 @@ metadata: name: redis-standalone spec: ports: - - name: redis-client - port: 6379 - protocol: TCP - targetPort: 6379 + - name: redis-client + port: 6379 + protocol: TCP + targetPort: 6379 selector: app: redis-standalone redis_setup_type: standalone role: standalone -# type: LoadBalancer + # type: LoadBalancer type: NodePort diff --git a/example/v1beta1/password_protected/secret.yaml b/example/v1beta1/password_protected/secret.yaml index 2a91c0d81..cf1cf0a6a 100644 --- a/example/v1beta1/password_protected/secret.yaml +++ b/example/v1beta1/password_protected/secret.yaml @@ -1,8 +1,8 @@ ---- +--- apiVersion: v1 kind: Secret metadata: name: redis-secret data: - password: T3BzdHJlZUAxMjM0Cg== -type: Opaque \ No newline at end of file + password: T3BzdHJlZUAxMjM0Cg== +type: Opaque diff --git a/example/v1beta1/redis-cluster.yaml b/example/v1beta1/redis-cluster.yaml index 148c4f74b..cf32d2868 100644 --- a/example/v1beta1/redis-cluster.yaml +++ b/example/v1beta1/redis-cluster.yaml @@ -23,8 +23,8 @@ spec: redisSecret: name: redis-secret key: password - # imagePullSecrets: - # - name: regcred + # imagePullSecrets: + # - name: regcred redisExporter: enabled: false image: quay.io/opstree/redis-exporter:v1.44.0 @@ -36,26 +36,26 @@ spec: limits: cpu: 100m memory: 128Mi -# Environment Variables for Redis Exporter - # env: - # - name: REDIS_EXPORTER_INCL_SYSTEM_METRICS - # value: "true" - # - name: UI_PROPERTIES_FILE_NAME - # valueFrom: - # configMapKeyRef: - # name: game-demo - # key: ui_properties_file_name - # - name: SECRET_USERNAME - # valueFrom: - # secretKeyRef: - # name: mysecret - # key: username -# redisLeader: -# redisConfig: -# additionalRedisConfig: redis-external-config -# redisFollower: -# redisConfig: -# additionalRedisConfig: redis-external-config + # Environment Variables for Redis Exporter + # env: + # - name: REDIS_EXPORTER_INCL_SYSTEM_METRICS + # value: "true" + # - name: UI_PROPERTIES_FILE_NAME + # valueFrom: + # configMapKeyRef: + # name: game-demo + # key: ui_properties_file_name + # - name: SECRET_USERNAME + # valueFrom: + # secretKeyRef: + # name: mysecret + # key: username + # redisLeader: + # redisConfig: + # additionalRedisConfig: redis-external-config + # redisFollower: + # redisConfig: + # additionalRedisConfig: redis-external-config storage: volumeClaimTemplate: spec: @@ -64,8 +64,8 @@ spec: resources: requests: storage: 1Gi - # nodeSelector: - # kubernetes.io/hostname: minikube - # priorityClassName: - # Affinity: - # Tolerations: [] + # nodeSelector: + # kubernetes.io/hostname: minikube + # priorityClassName: + # Affinity: + # Tolerations: [] diff --git a/example/v1beta1/redis-replication.yaml b/example/v1beta1/redis-replication.yaml index 5170612f9..49e4262b4 100644 --- a/example/v1beta1/redis-replication.yaml +++ b/example/v1beta1/redis-replication.yaml @@ -2,7 +2,7 @@ apiVersion: redis.redis.opstreelabs.in/v1beta1 kind: RedisReplication metadata: - name: redis-replication + name: redis-replication spec: clusterSize: 3 securityContext: @@ -10,7 +10,7 @@ spec: fsGroup: 1000 # redisConfig: # additionalRedisConfig: redis-external-config - kubernetesConfig: + kubernetesConfig: image: quay.io/opstree/redis:v7.0.5 imagePullPolicy: IfNotPresent resources: @@ -20,11 +20,11 @@ spec: limits: cpu: 101m memory: 128Mi - # redisSecret: - # name: redis-secret - # key: password - # imagePullSecrets: - # - name: regcred + # redisSecret: + # name: redis-secret + # key: password + # imagePullSecrets: + # - name: regcred redisExporter: enabled: false image: quay.io/opstree/redis-exporter:v1.44.0 @@ -36,20 +36,20 @@ spec: limits: cpu: 100m memory: 128Mi -# Environment Variables for Redis Exporter - # env: - # - name: REDIS_EXPORTER_INCL_SYSTEM_METRICS - # value: "true" - # - name: UI_PROPERTIES_FILE_NAME - # valueFrom: - # configMapKeyRef: - # name: game-demo - # key: ui_properties_file_name - # - name: SECRET_USERNAME - # valueFrom: - # secretKeyRef: - # name: mysecret - # key: username + # Environment Variables for Redis Exporter + # env: + # - name: REDIS_EXPORTER_INCL_SYSTEM_METRICS + # value: "true" + # - name: UI_PROPERTIES_FILE_NAME + # valueFrom: + # configMapKeyRef: + # name: game-demo + # key: ui_properties_file_name + # - name: SECRET_USERNAME + # valueFrom: + # secretKeyRef: + # name: mysecret + # key: username storage: volumeClaimTemplate: spec: @@ -57,4 +57,4 @@ spec: accessModes: ["ReadWriteOnce"] resources: requests: - storage: 1Gi \ No newline at end of file + storage: 1Gi diff --git a/example/v1beta1/redis-sentinel.yaml b/example/v1beta1/redis-sentinel.yaml index 430916b6c..c6eca8fd8 100644 --- a/example/v1beta1/redis-sentinel.yaml +++ b/example/v1beta1/redis-sentinel.yaml @@ -8,10 +8,10 @@ spec: securityContext: runAsUser: 1000 fsGroup: 1000 - redisSentinelConfig: - redisReplicationName : redis-replication + redisSentinelConfig: + redisReplicationName: redis-replication kubernetesConfig: - image: quay.io/opstree/redis-sentinel:v7.0.12 + image: quay.io/opstree/redis-sentinel:v7.0.12 imagePullPolicy: IfNotPresent resources: requests: diff --git a/example/v1beta1/redis-standalone.yaml b/example/v1beta1/redis-standalone.yaml index 00340ed64..c5359b8cc 100644 --- a/example/v1beta1/redis-standalone.yaml +++ b/example/v1beta1/redis-standalone.yaml @@ -16,11 +16,11 @@ spec: limits: cpu: 101m memory: 128Mi - # redisSecret: - # name: redis-secret - # key: password - # imagePullSecrets: - # - name: regcred + # redisSecret: + # name: redis-secret + # key: password + # imagePullSecrets: + # - name: regcred redisExporter: enabled: false image: quay.io/opstree/redis-exporter:v1.44.0 @@ -32,20 +32,20 @@ spec: limits: cpu: 100m memory: 128Mi -# Environment Variables for Redis Exporter - # env: - # - name: REDIS_EXPORTER_INCL_SYSTEM_METRICS - # value: "true" - # - name: UI_PROPERTIES_FILE_NAME - # valueFrom: - # configMapKeyRef: - # name: game-demo - # key: ui_properties_file_name - # - name: SECRET_USERNAME - # valueFrom: - # secretKeyRef: - # name: mysecret - # key: username + # Environment Variables for Redis Exporter + # env: + # - name: REDIS_EXPORTER_INCL_SYSTEM_METRICS + # value: "true" + # - name: UI_PROPERTIES_FILE_NAME + # valueFrom: + # configMapKeyRef: + # name: game-demo + # key: ui_properties_file_name + # - name: SECRET_USERNAME + # valueFrom: + # secretKeyRef: + # name: mysecret + # key: username storage: volumeClaimTemplate: spec: @@ -54,9 +54,9 @@ spec: resources: requests: storage: 1Gi - # nodeSelector: - # kubernetes.io/hostname: minikube - # securityContext: {} - # priorityClassName: - # affinity: - # Tolerations: [] + # nodeSelector: + # kubernetes.io/hostname: minikube + # securityContext: {} + # priorityClassName: + # affinity: + # Tolerations: [] diff --git a/example/v1beta1/redis_monitoring/clusterd.yaml b/example/v1beta1/redis_monitoring/clusterd.yaml index 119d86ef2..e28737c93 100644 --- a/example/v1beta1/redis_monitoring/clusterd.yaml +++ b/example/v1beta1/redis_monitoring/clusterd.yaml @@ -26,4 +26,4 @@ spec: resources: requests: storage: 1Gi - # storageClassName: standard + # storageClassName: standard diff --git a/example/v1beta1/redis_sentinel/sentinel.yaml b/example/v1beta1/redis_sentinel/sentinel.yaml index 430916b6c..c6eca8fd8 100644 --- a/example/v1beta1/redis_sentinel/sentinel.yaml +++ b/example/v1beta1/redis_sentinel/sentinel.yaml @@ -8,10 +8,10 @@ spec: securityContext: runAsUser: 1000 fsGroup: 1000 - redisSentinelConfig: - redisReplicationName : redis-replication + redisSentinelConfig: + redisReplicationName: redis-replication kubernetesConfig: - image: quay.io/opstree/redis-sentinel:v7.0.12 + image: quay.io/opstree/redis-sentinel:v7.0.12 imagePullPolicy: IfNotPresent resources: requests: diff --git a/example/v1beta1/tls_enabled/redis-replication.yaml b/example/v1beta1/tls_enabled/redis-replication.yaml index ac8b34490..42711e713 100644 --- a/example/v1beta1/tls_enabled/redis-replication.yaml +++ b/example/v1beta1/tls_enabled/redis-replication.yaml @@ -1,3 +1,4 @@ +# yamllint disable-line rule:line-length # Examples of creating a valid TLS certificate can be found at ./config/certmanager via Cert-manager --- apiVersion: redis.redis.opstreelabs.in/v1beta1 diff --git a/example/v1beta1/tls_enabled/redis-standalone.yaml b/example/v1beta1/tls_enabled/redis-standalone.yaml index 3e254fd65..1e213afa7 100644 --- a/example/v1beta1/tls_enabled/redis-standalone.yaml +++ b/example/v1beta1/tls_enabled/redis-standalone.yaml @@ -1,3 +1,4 @@ +# yamllint disable-line rule:line-length # Examples of creating a valid TLS certificate can be found at ./config/certmanager via Cert-manager --- apiVersion: redis.redis.opstreelabs.in/v1beta1 diff --git a/example/v1beta1/upgrade-strategy/standalone.yaml b/example/v1beta1/upgrade-strategy/standalone.yaml index bfc1b445e..2ce6c1757 100644 --- a/example/v1beta1/upgrade-strategy/standalone.yaml +++ b/example/v1beta1/upgrade-strategy/standalone.yaml @@ -9,7 +9,7 @@ spec: imagePullPolicy: IfNotPresent updateStrategy: type: OnDelete -# type: RollingUpdate + # type: RollingUpdate securityContext: runAsUser: 1000 fsGroup: 1000 @@ -23,4 +23,4 @@ spec: storage: 1Gi redisExporter: enabled: false - image: quay.io/opstree/redis-exporter:v1.44.0 \ No newline at end of file + image: quay.io/opstree/redis-exporter:v1.44.0 diff --git a/example/v1beta1/volume_mount/configmap.yaml b/example/v1beta1/volume_mount/configmap.yaml index eb5501a23..b6bc927f1 100644 --- a/example/v1beta1/volume_mount/configmap.yaml +++ b/example/v1beta1/volume_mount/configmap.yaml @@ -1,3 +1,4 @@ +--- apiVersion: v1 kind: ConfigMap metadata: @@ -5,4 +6,4 @@ metadata: labels: app: myapplication data: - my-key: my-value \ No newline at end of file + my-key: my-value diff --git a/example/v1beta1/volume_mount/redis-cluster.yaml b/example/v1beta1/volume_mount/redis-cluster.yaml index 1b74ee260..799b1b914 100644 --- a/example/v1beta1/volume_mount/redis-cluster.yaml +++ b/example/v1beta1/volume_mount/redis-cluster.yaml @@ -1,3 +1,4 @@ +--- apiVersion: redis.redis.opstreelabs.in/v1beta1 kind: RedisCluster metadata: @@ -22,8 +23,8 @@ spec: redisSecret: name: redis-secret key: password - # imagePullSecrets: - # - name: regcred + # imagePullSecrets: + # - name: regcred redisExporter: enabled: false image: quay.io/opstree/redis-exporter:v1.44.0 @@ -43,11 +44,11 @@ spec: resources: requests: storage: 1Gi - volumemount: + volumeMount: volume: - name: example-config configMap: name: example-configmap - mount: + mountPath: - mountPath: /config - name: example-config \ No newline at end of file + name: example-config diff --git a/example/v1beta1/volume_mount/redis-replication.yaml b/example/v1beta1/volume_mount/redis-replication.yaml index 58adea03a..bed424781 100644 --- a/example/v1beta1/volume_mount/redis-replication.yaml +++ b/example/v1beta1/volume_mount/redis-replication.yaml @@ -1,7 +1,8 @@ +--- apiVersion: redis.redis.opstreelabs.in/v1beta1 kind: RedisReplication metadata: - name: redis-replication + name: redis-replication spec: clusterSize: 3 # redisConfig: @@ -16,11 +17,11 @@ spec: limits: cpu: 101m memory: 128Mi - # redisSecret: - # name: redis-secret - # key: password - # imagePullSecrets: - # - name: regcred + # redisSecret: + # name: redis-secret + # key: password + # imagePullSecrets: + # - name: regcred redisExporter: enabled: false image: quay.io/opstree/redis-exporter:v1.44.0 @@ -40,11 +41,11 @@ spec: resources: requests: storage: 1Gi - volumemount: + volumeMount: volume: - name: example-config configMap: name: example-configmap - mount: + mountPath: - mountPath: /config name: example-config diff --git a/example/v1beta1/volume_mount/redis-standalone.yaml b/example/v1beta1/volume_mount/redis-standalone.yaml index 6d1a59f44..8af9ec3a0 100644 --- a/example/v1beta1/volume_mount/redis-standalone.yaml +++ b/example/v1beta1/volume_mount/redis-standalone.yaml @@ -1,3 +1,4 @@ +--- apiVersion: redis.redis.opstreelabs.in/v1beta1 kind: Redis metadata: @@ -15,11 +16,11 @@ spec: limits: cpu: 101m memory: 128Mi - # redisSecret: - # name: redis-secret - # key: password - # imagePullSecrets: - # - name: regcred + # redisSecret: + # name: redis-secret + # key: password + # imagePullSecrets: + # - name: regcred redisExporter: enabled: false image: quay.io/opstree/redis-exporter:v1.44.0 @@ -39,11 +40,11 @@ spec: resources: requests: storage: 1Gi - volumemount: + volumeMount: volume: - name: example-config configMap: name: example-configmap - mount: + mountPath: - mountPath: /config name: example-config diff --git a/example/v1beta2/acl_config/acl-secret.yaml b/example/v1beta2/acl_config/acl-secret.yaml index 5f9bae4d7..734b4f086 100644 --- a/example/v1beta2/acl_config/acl-secret.yaml +++ b/example/v1beta2/acl_config/acl-secret.yaml @@ -1,8 +1,10 @@ +--- apiVersion: v1 data: + # yamllint disable-line rule:line-length user.acl: dXNlciBvcHN0cmVlIG9uIH4qICYqICtAYWxsID5hYmNAMTIzCnVzZXIgYnVpbGRwaXBlciBvbiB+KiAmKiArQGFsbCA+YWJjQDEyMwo= kind: Secret metadata: name: acl-secret namespace: default -type: Opaque \ No newline at end of file +type: Opaque diff --git a/example/v1beta2/acl_config/cluster.yaml b/example/v1beta2/acl_config/cluster.yaml index 70671263f..5a73ad257 100644 --- a/example/v1beta2/acl_config/cluster.yaml +++ b/example/v1beta2/acl_config/cluster.yaml @@ -20,14 +20,14 @@ spec: limits: cpu: 101m memory: 128Mi - # redisSecret: - # name: redis-secret - # key: password - # imagePullSecrets: - # - name: regcred + # redisSecret: + # name: redis-secret + # key: password + # imagePullSecrets: + # - name: regcred acl: - secret : - name: acl-secret + secret: + secretName: acl-secret redisExporter: enabled: true image: quay.io/opstree/redis-exporter:v1.44.0 diff --git a/example/v1beta2/acl_config/replication.yaml b/example/v1beta2/acl_config/replication.yaml index 8b53a5ae6..dcd52ce0e 100644 --- a/example/v1beta2/acl_config/replication.yaml +++ b/example/v1beta2/acl_config/replication.yaml @@ -2,7 +2,7 @@ apiVersion: redis.redis.opstreelabs.in/v1beta2 kind: RedisReplication metadata: - name: redis-replication + name: redis-replication spec: clusterSize: 3 podSecurityContext: @@ -10,7 +10,7 @@ spec: fsGroup: 1000 # redisConfig: # additionalRedisConfig: redis-external-config - kubernetesConfig: + kubernetesConfig: image: quay.io/opstree/redis:v7.0.12 imagePullPolicy: IfNotPresent resources: @@ -20,15 +20,15 @@ spec: limits: cpu: 101m memory: 128Mi - # redisSecret: - # name: redis-secret - # key: password - # imagePullSecrets: - # - name: regcred + # redisSecret: + # name: redis-secret + # key: password + # imagePullSecrets: + # - name: regcred acl: - secret : - name: acl-secret - + secret: + secretName: acl-secret + redisExporter: enabled: false image: quay.io/opstree/redis-exporter:v1.44.0 @@ -48,4 +48,4 @@ spec: accessModes: ["ReadWriteOnce"] resources: requests: - storage: 1Gi \ No newline at end of file + storage: 1Gi diff --git a/example/v1beta2/acl_config/standalone.yaml b/example/v1beta2/acl_config/standalone.yaml index f586f9727..ed243a828 100644 --- a/example/v1beta2/acl_config/standalone.yaml +++ b/example/v1beta2/acl_config/standalone.yaml @@ -16,14 +16,14 @@ spec: limits: cpu: 101m memory: 128Mi - # redisSecret: - # name: redis-secret - # key: password - # imagePullSecrets: - # - name: regcred + # redisSecret: + # name: redis-secret + # key: password + # imagePullSecrets: + # - name: regcred acl: - secret: - name: acl-secret + secret: + secretName: acl-secret redisExporter: enabled: false diff --git a/example/v1beta2/additional_config/configmap.yaml b/example/v1beta2/additional_config/configmap.yaml index f68ea80ac..d06cec022 100644 --- a/example/v1beta2/additional_config/configmap.yaml +++ b/example/v1beta2/additional_config/configmap.yaml @@ -6,5 +6,5 @@ metadata: data: redis-additional.conf: | tcp-keepalive 400 - slowlog-max-len 158 + slowlog-max-len 158 stream-node-max-bytes 2048 diff --git a/example/v1beta2/advance_config/clusterd.yaml b/example/v1beta2/advance_config/clusterd.yaml index 57d7ff97f..ade429f8b 100644 --- a/example/v1beta2/advance_config/clusterd.yaml +++ b/example/v1beta2/advance_config/clusterd.yaml @@ -38,8 +38,8 @@ spec: resources: requests: storage: 1Gi - # nodeSelector: {} - # podSecurityContext: {} - # priorityClassName: "" - # affinity: {} - # Tolerations: [] + # nodeSelector: {} + # podSecurityContext: {} + # priorityClassName: "" + # affinity: {} + # Tolerations: [] diff --git a/example/v1beta2/advance_config/standalone.yaml b/example/v1beta2/advance_config/standalone.yaml index f74862b5a..cd4fe06ce 100644 --- a/example/v1beta2/advance_config/standalone.yaml +++ b/example/v1beta2/advance_config/standalone.yaml @@ -28,8 +28,8 @@ spec: redisExporter: enabled: false image: quay.io/opstree/redis-exporter:v1.44.0 - # nodeSelector: {} - # podSecurityContext: {} - # priorityClassName: "" - # affinity: {} - # Tolerations: [] + # nodeSelector: {} + # podSecurityContext: {} + # priorityClassName: "" + # affinity: {} + # Tolerations: [] diff --git a/example/v1beta2/affinity/clusterd.yaml b/example/v1beta2/affinity/clusterd.yaml index 84623e61d..d7c3f64bf 100644 --- a/example/v1beta2/affinity/clusterd.yaml +++ b/example/v1beta2/affinity/clusterd.yaml @@ -38,7 +38,7 @@ spec: operator: In values: - redis-cluster-follower - - redis-cluster-leader + - redis-cluster-leader topologyKey: "kubernetes.io/hostname" storage: volumeClaimTemplate: diff --git a/example/v1beta2/backup_restore/backup/env-secrets.yaml b/example/v1beta2/backup_restore/backup/env-secrets.yaml index ae124980b..84e1be7e9 100644 --- a/example/v1beta2/backup_restore/backup/env-secrets.yaml +++ b/example/v1beta2/backup_restore/backup/env-secrets.yaml @@ -1,3 +1,4 @@ +--- apiVersion: v1 kind: Secret metadata: @@ -15,4 +16,4 @@ stringData: AWS_S3_BUCKET: shubham-redis AWS_DEFAULT_REGION: ap-south-1 AWS_ACCESS_KEY_ID: "" - AWS_SECRET_ACCESS_KEY: "" \ No newline at end of file + AWS_SECRET_ACCESS_KEY: "" diff --git a/example/v1beta2/backup_restore/backup/job.yaml b/example/v1beta2/backup_restore/backup/job.yaml index 6b9fcdc87..414eb1433 100644 --- a/example/v1beta2/backup_restore/backup/job.yaml +++ b/example/v1beta2/backup_restore/backup/job.yaml @@ -1,3 +1,4 @@ +--- apiVersion: batch/v1 kind: Job metadata: @@ -10,11 +11,11 @@ spec: spec: serviceAccountName: backup-service-account containers: - - name: redis-operator-backup-container - image: "quay.io/opstree/redis-operator-backup:v0.15.1" - command: ["/bin/bash", "-c", "/backup/backup.bash"] - imagePullPolicy: Always - envFrom: - - secretRef: - name: env-secrets + - name: redis-operator-backup-container + image: "quay.io/opstree/redis-operator-backup:v0.15.1" + command: ["/bin/bash", "-c", "/backup/backup.bash"] + imagePullPolicy: Always + envFrom: + - secretRef: + name: env-secrets restartPolicy: Never diff --git a/example/v1beta2/backup_restore/backup/role-binding.yaml b/example/v1beta2/backup_restore/backup/role-binding.yaml index bdab12539..a60dc5234 100644 --- a/example/v1beta2/backup_restore/backup/role-binding.yaml +++ b/example/v1beta2/backup_restore/backup/role-binding.yaml @@ -1,3 +1,4 @@ +--- apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: @@ -8,4 +9,4 @@ subjects: roleRef: kind: Role name: modify-pods - apiGroup: rbac.authorization.k8s.io \ No newline at end of file + apiGroup: rbac.authorization.k8s.io diff --git a/example/v1beta2/backup_restore/backup/role.yaml b/example/v1beta2/backup_restore/backup/role.yaml index 1ab15a715..d84c34535 100644 --- a/example/v1beta2/backup_restore/backup/role.yaml +++ b/example/v1beta2/backup_restore/backup/role.yaml @@ -1,3 +1,4 @@ +--- apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: @@ -5,4 +6,4 @@ metadata: rules: - apiGroups: ["*"] resources: ["*"] - verbs: ["*"] \ No newline at end of file + verbs: ["*"] diff --git a/example/v1beta2/backup_restore/backup/service-account.yaml b/example/v1beta2/backup_restore/backup/service-account.yaml index d860c2d63..6be2a7ac8 100644 --- a/example/v1beta2/backup_restore/backup/service-account.yaml +++ b/example/v1beta2/backup_restore/backup/service-account.yaml @@ -1,4 +1,5 @@ +--- apiVersion: v1 kind: ServiceAccount metadata: - name: backup-service-account \ No newline at end of file + name: backup-service-account diff --git a/example/v1beta2/backup_restore/restore/env-secret.yaml b/example/v1beta2/backup_restore/restore/env-secret.yaml index 03748498a..9a20b1270 100644 --- a/example/v1beta2/backup_restore/restore/env-secret.yaml +++ b/example/v1beta2/backup_restore/restore/env-secret.yaml @@ -1,3 +1,4 @@ +--- apiVersion: v1 kind: Secret metadata: @@ -14,4 +15,4 @@ stringData: AWS_S3_BUCKET: shubham-redis AWS_DEFAULT_REGION: ap-south-1 AWS_ACCESS_KEY_ID: "" - AWS_SECRET_ACCESS_KEY: "" \ No newline at end of file + AWS_SECRET_ACCESS_KEY: "" diff --git a/example/v1beta2/backup_restore/restore/redis-cluster.yaml b/example/v1beta2/backup_restore/restore/redis-cluster.yaml index 50fdaea5e..d51445ffe 100644 --- a/example/v1beta2/backup_restore/restore/redis-cluster.yaml +++ b/example/v1beta2/backup_restore/restore/redis-cluster.yaml @@ -20,11 +20,11 @@ spec: limits: cpu: 101m memory: 128Mi - # redisSecret: - # name: redis-secret - # key: password - # imagePullSecrets: - # - name: regcred + # redisSecret: + # name: redis-secret + # key: password + # imagePullSecrets: + # - name: regcred initContainer: enabled: true image: quay.io/opstree/redis-operator-restore:latest @@ -88,26 +88,26 @@ spec: secretKeyRef: name: env-secrets key: AWS_SECRET_ACCESS_KEY -# Environment Variables for Redis Exporter - # env: - # - name: REDIS_EXPORTER_INCL_SYSTEM_METRICS - # value: "true" - # - name: UI_PROPERTIES_FILE_NAME - # valueFrom: - # configMapKeyRef: - # name: game-demo - # key: ui_properties_file_name - # - name: SECRET_USERNAME - # valueFrom: - # secretKeyRef: - # name: mysecret - # key: username -# redisLeader: -# redisConfig: -# additionalRedisConfig: redis-external-config -# redisFollower: -# redisConfig: -# additionalRedisConfig: redis-external-config + # Environment Variables for Redis Exporter + # env: + # - name: REDIS_EXPORTER_INCL_SYSTEM_METRICS + # value: "true" + # - name: UI_PROPERTIES_FILE_NAME + # valueFrom: + # configMapKeyRef: + # name: game-demo + # key: ui_properties_file_name + # - name: SECRET_USERNAME + # valueFrom: + # secretKeyRef: + # name: mysecret + # key: username + # redisLeader: + # redisConfig: + # additionalRedisConfig: redis-external-config + # redisFollower: + # redisConfig: + # additionalRedisConfig: redis-external-config redisLeader: redisConfig: @@ -130,8 +130,8 @@ spec: resources: requests: storage: 1Gi - # nodeSelector: - # kubernetes.io/hostname: minikube - # priorityClassName: - # Affinity: - # Tolerations: [] + # nodeSelector: + # kubernetes.io/hostname: minikube + # priorityClassName: + # Affinity: + # Tolerations: [] diff --git a/example/v1beta2/eks-cluster.yaml b/example/v1beta2/eks-cluster.yaml deleted file mode 100644 index 4474537e3..000000000 --- a/example/v1beta2/eks-cluster.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: eksctl.io/v1alpha5 -kind: ClusterConfig -metadata: - name: operator-testing - region: us-west-2 - version: "1.22" -managedNodeGroups: - - name: ng-1 - instanceType: t3a.medium - desiredCapacity: 3 - volumeSize: 30 - ssh: - allow: true - volumeType: gp3 -kubernetesNetworkConfig: - ipFamily: IPv4 -# ipFamily: IPv6 -addons: - - name: vpc-cni - - name: coredns - - name: kube-proxy - - name: aws-ebs-csi-driver - attachPolicyARNs: - - arn:aws:iam::aws:policy/service-role/AmazonEBSCSIDriverPolicy -iam: - withOIDC: true diff --git a/example/v1beta2/env_vars/redis-cluster.yaml b/example/v1beta2/env_vars/redis-cluster.yaml index 082c1ae81..c573cd98c 100644 --- a/example/v1beta2/env_vars/redis-cluster.yaml +++ b/example/v1beta2/env_vars/redis-cluster.yaml @@ -21,15 +21,15 @@ spec: cpu: 101m memory: 128Mi env: - - name: CUSTOM_ENV_VAR_1 - value: "custom_value_1" - - name: CUSTOM_ENV_VAR_2 - value: "custom_value_2" - # redisSecret: - # name: redis-secret - # key: password - # imagePullSecrets: - # - name: regcred + - name: CUSTOM_ENV_VAR_1 + value: "custom_value_1" + - name: CUSTOM_ENV_VAR_2 + value: "custom_value_2" + # redisSecret: + # name: redis-secret + # key: password + # imagePullSecrets: + # - name: regcred storage: volumeClaimTemplate: spec: @@ -45,4 +45,3 @@ spec: resources: requests: storage: 1Gi - diff --git a/example/v1beta2/env_vars/redis-replication.yaml b/example/v1beta2/env_vars/redis-replication.yaml index 99214c8bc..3c27d74c9 100644 --- a/example/v1beta2/env_vars/redis-replication.yaml +++ b/example/v1beta2/env_vars/redis-replication.yaml @@ -2,7 +2,7 @@ apiVersion: redis.redis.opstreelabs.in/v1beta2 kind: RedisReplication metadata: - name: redis-replication + name: redis-replication spec: clusterSize: 3 podSecurityContext: @@ -10,7 +10,7 @@ spec: fsGroup: 1000 # redisConfig: # additionalRedisConfig: redis-external-config - kubernetesConfig: + kubernetesConfig: image: quay.io/opstree/redis:v7.0.12 imagePullPolicy: IfNotPresent resources: @@ -23,13 +23,13 @@ spec: redisSecret: name: redis-secret key: password - # imagePullSecrets: - # - name: regcred + # imagePullSecrets: + # - name: regcred env: - - name: CUSTOM_ENV_VAR_1 - value: "custom_value_1" - - name: CUSTOM_ENV_VAR_2 - value: "custom_value_2" + - name: CUSTOM_ENV_VAR_1 + value: "custom_value_1" + - name: CUSTOM_ENV_VAR_2 + value: "custom_value_2" storage: volumeClaimTemplate: spec: @@ -37,4 +37,4 @@ spec: accessModes: ["ReadWriteOnce"] resources: requests: - storage: 1Gi \ No newline at end of file + storage: 1Gi diff --git a/example/v1beta2/env_vars/redis-sentinel.yaml b/example/v1beta2/env_vars/redis-sentinel.yaml index 6dd84edeb..26e9ef6c9 100644 --- a/example/v1beta2/env_vars/redis-sentinel.yaml +++ b/example/v1beta2/env_vars/redis-sentinel.yaml @@ -11,10 +11,10 @@ spec: pdb: enabled: false minAvailable: 1 - redisSentinelConfig: - redisReplicationName : redis-replication + redisSentinelConfig: + redisReplicationName: redis-replication kubernetesConfig: - image: quay.io/opstree/redis-sentinel:v7.0.12 + image: quay.io/opstree/redis-sentinel:v7.0.12 imagePullPolicy: IfNotPresent resources: requests: @@ -24,7 +24,7 @@ spec: cpu: 101m memory: 128Mi env: - - name: CUSTOM_ENV_VAR_1 - value: "custom_value_1" - - name: CUSTOM_ENV_VAR_2 - value: "custom_value_2" \ No newline at end of file + - name: CUSTOM_ENV_VAR_1 + value: "custom_value_1" + - name: CUSTOM_ENV_VAR_2 + value: "custom_value_2" diff --git a/example/v1beta2/env_vars/redis-standalone.yaml b/example/v1beta2/env_vars/redis-standalone.yaml index e0dd08947..89af0c973 100644 --- a/example/v1beta2/env_vars/redis-standalone.yaml +++ b/example/v1beta2/env_vars/redis-standalone.yaml @@ -8,7 +8,7 @@ spec: # additionalRedisConfig: redis-external-config podSecurityContext: runAsUser: 1000 - fsGroup: 1000 + fsGroup: 1000 kubernetesConfig: image: quay.io/opstree/redis:v7.0.12 imagePullPolicy: IfNotPresent @@ -19,11 +19,11 @@ spec: limits: cpu: 101m memory: 128Mi - # redisSecret: - # name: redis-secret - # key: password - # imagePullSecrets: - # - name: regcred + # redisSecret: + # name: redis-secret + # key: password + # imagePullSecrets: + # - name: regcred redisExporter: enabled: false image: quay.io/opstree/redis-exporter:v1.44.0 @@ -36,10 +36,10 @@ spec: cpu: 100m memory: 128Mi env: - - name: CUSTOM_ENV_VAR_1 - value: "custom_value_1" - - name: CUSTOM_ENV_VAR_2 - value: "custom_value_2" + - name: CUSTOM_ENV_VAR_1 + value: "custom_value_1" + - name: CUSTOM_ENV_VAR_2 + value: "custom_value_2" storage: volumeClaimTemplate: spec: @@ -48,9 +48,9 @@ spec: resources: requests: storage: 1Gi - # nodeSelector: - # kubernetes.io/hostname: minikube - # podSecurityContext: {} - # priorityClassName: - # affinity: - # Tolerations: [] + # nodeSelector: + # kubernetes.io/hostname: minikube + # podSecurityContext: {} + # priorityClassName: + # affinity: + # Tolerations: [] diff --git a/example/v1beta2/external_service/cluster-svc.yaml b/example/v1beta2/external_service/cluster-svc.yaml index 8e68ca75f..bcc2eceb4 100644 --- a/example/v1beta2/external_service/cluster-svc.yaml +++ b/example/v1beta2/external_service/cluster-svc.yaml @@ -8,17 +8,16 @@ metadata: role: leader name: redis-cluster-leaders spec: - clusterIP: 10.102.152.77 ports: - - name: redis-client - port: 6379 - protocol: TCP - targetPort: 6379 + - name: redis-client + port: 6379 + protocol: TCP + targetPort: 6379 selector: app: redis-cluster-leader redis_setup_type: cluster role: leader -# type: LoadBalancer + # type: LoadBalancer type: NodePort --- apiVersion: v1 @@ -30,15 +29,14 @@ metadata: role: follower name: redis-cluster-followers spec: - clusterIP: 10.108.109.134 ports: - - name: redis-client - port: 6379 - protocol: TCP - targetPort: 6379 + - name: redis-client + port: 6379 + protocol: TCP + targetPort: 6379 selector: app: redis-cluster-follower redis_setup_type: cluster role: follower -# type: LoadBalancer + # type: LoadBalancer type: NodePort diff --git a/example/v1beta2/external_service/replication-svc.yaml b/example/v1beta2/external_service/replication-svc.yaml index 5e412de80..0b63b380c 100644 --- a/example/v1beta2/external_service/replication-svc.yaml +++ b/example/v1beta2/external_service/replication-svc.yaml @@ -9,13 +9,13 @@ metadata: name: redis-replication spec: ports: - - name: redis-client - port: 6379 - protocol: TCP - targetPort: 6379 + - name: redis-client + port: 6379 + protocol: TCP + targetPort: 6379 selector: app: redis-replication redis_setup_type: replication role: replication -# type: LoadBalancer + # type: LoadBalancer type: NodePort diff --git a/example/v1beta2/external_service/standalone-svc.yaml b/example/v1beta2/external_service/standalone-svc.yaml index df4efe038..2c8c8aec5 100644 --- a/example/v1beta2/external_service/standalone-svc.yaml +++ b/example/v1beta2/external_service/standalone-svc.yaml @@ -9,13 +9,13 @@ metadata: name: redis-standalone spec: ports: - - name: redis-client - port: 6379 - protocol: TCP - targetPort: 6379 + - name: redis-client + port: 6379 + protocol: TCP + targetPort: 6379 selector: app: redis-standalone redis_setup_type: standalone role: standalone -# type: LoadBalancer + # type: LoadBalancer type: NodePort diff --git a/example/v1beta2/password_protected/secret.yaml b/example/v1beta2/password_protected/secret.yaml index 2a91c0d81..cf1cf0a6a 100644 --- a/example/v1beta2/password_protected/secret.yaml +++ b/example/v1beta2/password_protected/secret.yaml @@ -1,8 +1,8 @@ ---- +--- apiVersion: v1 kind: Secret metadata: name: redis-secret data: - password: T3BzdHJlZUAxMjM0Cg== -type: Opaque \ No newline at end of file + password: T3BzdHJlZUAxMjM0Cg== +type: Opaque diff --git a/example/v1beta2/redis-cluster.yaml b/example/v1beta2/redis-cluster.yaml index 87b308e3a..4b8fb65f4 100644 --- a/example/v1beta2/redis-cluster.yaml +++ b/example/v1beta2/redis-cluster.yaml @@ -20,11 +20,11 @@ spec: limits: cpu: 101m memory: 128Mi - # redisSecret: - # name: redis-secret - # key: password - # imagePullSecrets: - # - name: regcred + # redisSecret: + # name: redis-secret + # key: password + # imagePullSecrets: + # - name: regcred redisExporter: enabled: false image: quay.io/opstree/redis-exporter:v1.44.0 @@ -36,26 +36,26 @@ spec: limits: cpu: 100m memory: 128Mi -# Environment Variables for Redis Exporter - # env: - # - name: REDIS_EXPORTER_INCL_SYSTEM_METRICS - # value: "true" - # - name: UI_PROPERTIES_FILE_NAME - # valueFrom: - # configMapKeyRef: - # name: game-demo - # key: ui_properties_file_name - # - name: SECRET_USERNAME - # valueFrom: - # secretKeyRef: - # name: mysecret - # key: username -# redisLeader: -# redisConfig: -# additionalRedisConfig: redis-external-config -# redisFollower: -# redisConfig: -# additionalRedisConfig: redis-external-config + # Environment Variables for Redis Exporter + # env: + # - name: REDIS_EXPORTER_INCL_SYSTEM_METRICS + # value: "true" + # - name: UI_PROPERTIES_FILE_NAME + # valueFrom: + # configMapKeyRef: + # name: game-demo + # key: ui_properties_file_name + # - name: SECRET_USERNAME + # valueFrom: + # secretKeyRef: + # name: mysecret + # key: username + # redisLeader: + # redisConfig: + # additionalRedisConfig: redis-external-config + # redisFollower: + # redisConfig: + # additionalRedisConfig: redis-external-config storage: volumeClaimTemplate: spec: @@ -71,8 +71,8 @@ spec: resources: requests: storage: 1Gi - # nodeSelector: - # kubernetes.io/hostname: minikube - # priorityClassName: - # Affinity: - # Tolerations: [] + # nodeSelector: + # kubernetes.io/hostname: minikube + # priorityClassName: + # Affinity: + # Tolerations: [] diff --git a/example/v1beta2/redis-replication.yaml b/example/v1beta2/redis-replication.yaml index e7a11022e..1f4ca8194 100644 --- a/example/v1beta2/redis-replication.yaml +++ b/example/v1beta2/redis-replication.yaml @@ -2,7 +2,7 @@ apiVersion: redis.redis.opstreelabs.in/v1beta2 kind: RedisReplication metadata: - name: redis-replication + name: redis-replication spec: clusterSize: 3 podSecurityContext: @@ -10,7 +10,7 @@ spec: fsGroup: 1000 # redisConfig: # additionalRedisConfig: redis-external-config - kubernetesConfig: + kubernetesConfig: image: quay.io/opstree/redis:v7.0.12 imagePullPolicy: IfNotPresent resources: @@ -23,8 +23,8 @@ spec: redisSecret: name: redis-secret key: password - # imagePullSecrets: - # - name: regcred + # imagePullSecrets: + # - name: regcred redisExporter: enabled: false image: quay.io/opstree/redis-exporter:v1.44.0 @@ -36,20 +36,20 @@ spec: limits: cpu: 100m memory: 128Mi -# Environment Variables for Redis Exporter - # env: - # - name: REDIS_EXPORTER_INCL_SYSTEM_METRICS - # value: "true" - # - name: UI_PROPERTIES_FILE_NAME - # valueFrom: - # configMapKeyRef: - # name: game-demo - # key: ui_properties_file_name - # - name: SECRET_USERNAME - # valueFrom: - # secretKeyRef: - # name: mysecret - # key: username + # Environment Variables for Redis Exporter + # env: + # - name: REDIS_EXPORTER_INCL_SYSTEM_METRICS + # value: "true" + # - name: UI_PROPERTIES_FILE_NAME + # valueFrom: + # configMapKeyRef: + # name: game-demo + # key: ui_properties_file_name + # - name: SECRET_USERNAME + # valueFrom: + # secretKeyRef: + # name: mysecret + # key: username storage: volumeClaimTemplate: spec: @@ -57,4 +57,4 @@ spec: accessModes: ["ReadWriteOnce"] resources: requests: - storage: 1Gi \ No newline at end of file + storage: 1Gi diff --git a/example/v1beta2/redis-sentinel.yaml b/example/v1beta2/redis-sentinel.yaml index e53105d6e..771e66d77 100644 --- a/example/v1beta2/redis-sentinel.yaml +++ b/example/v1beta2/redis-sentinel.yaml @@ -11,10 +11,10 @@ spec: pdb: enabled: false minAvailable: 1 - redisSentinelConfig: - redisReplicationName : redis-replication + redisSentinelConfig: + redisReplicationName: redis-replication kubernetesConfig: - image: quay.io/opstree/redis-sentinel:v7.0.12 + image: quay.io/opstree/redis-sentinel:v7.0.12 imagePullPolicy: IfNotPresent resources: requests: diff --git a/example/v1beta2/redis-standalone.yaml b/example/v1beta2/redis-standalone.yaml index 27e2b5e7f..11e903441 100644 --- a/example/v1beta2/redis-standalone.yaml +++ b/example/v1beta2/redis-standalone.yaml @@ -8,7 +8,7 @@ spec: # additionalRedisConfig: redis-external-config podSecurityContext: runAsUser: 1000 - fsGroup: 1000 + fsGroup: 1000 kubernetesConfig: image: quay.io/opstree/redis:v7.0.12 imagePullPolicy: IfNotPresent @@ -19,11 +19,11 @@ spec: limits: cpu: 101m memory: 128Mi - # redisSecret: - # name: redis-secret - # key: password - # imagePullSecrets: - # - name: regcred + # redisSecret: + # name: redis-secret + # key: password + # imagePullSecrets: + # - name: regcred redisExporter: enabled: false image: quay.io/opstree/redis-exporter:v1.44.0 @@ -35,20 +35,20 @@ spec: limits: cpu: 100m memory: 128Mi -# Environment Variables for Redis Exporter - # env: - # - name: REDIS_EXPORTER_INCL_SYSTEM_METRICS - # value: "true" - # - name: UI_PROPERTIES_FILE_NAME - # valueFrom: - # configMapKeyRef: - # name: game-demo - # key: ui_properties_file_name - # - name: SECRET_USERNAME - # valueFrom: - # secretKeyRef: - # name: mysecret - # key: username + # Environment Variables for Redis Exporter + # env: + # - name: REDIS_EXPORTER_INCL_SYSTEM_METRICS + # value: "true" + # - name: UI_PROPERTIES_FILE_NAME + # valueFrom: + # configMapKeyRef: + # name: game-demo + # key: ui_properties_file_name + # - name: SECRET_USERNAME + # valueFrom: + # secretKeyRef: + # name: mysecret + # key: username storage: volumeClaimTemplate: spec: @@ -57,9 +57,9 @@ spec: resources: requests: storage: 1Gi - # nodeSelector: - # kubernetes.io/hostname: minikube - # podSecurityContext: {} - # priorityClassName: - # affinity: - # Tolerations: [] + # nodeSelector: + # kubernetes.io/hostname: minikube + # podSecurityContext: {} + # priorityClassName: + # affinity: + # Tolerations: [] diff --git a/example/v1beta2/redis_monitoring/clusterd.yaml b/example/v1beta2/redis_monitoring/clusterd.yaml index 8ba5e9ea5..82a6659f2 100644 --- a/example/v1beta2/redis_monitoring/clusterd.yaml +++ b/example/v1beta2/redis_monitoring/clusterd.yaml @@ -33,4 +33,4 @@ spec: resources: requests: storage: 1Gi - # storageClassName: standard + # storageClassName: standard diff --git a/example/v1beta2/redis_sentinel/sentinel.yaml b/example/v1beta2/redis_sentinel/sentinel.yaml index 78f838906..389bfe1a4 100644 --- a/example/v1beta2/redis_sentinel/sentinel.yaml +++ b/example/v1beta2/redis_sentinel/sentinel.yaml @@ -8,10 +8,10 @@ spec: podSecurityContext: runAsUser: 1000 fsGroup: 1000 - redisSentinelConfig: - redisReplicationName : redis-replication + redisSentinelConfig: + redisReplicationName: redis-replication kubernetesConfig: - image: quay.io/opstree/redis-sentinel:v7.0.12 + image: quay.io/opstree/redis-sentinel:v7.0.12 imagePullPolicy: IfNotPresent resources: requests: diff --git a/example/v1beta2/sidecar_features/configmap.yaml b/example/v1beta2/sidecar_features/configmap.yaml index 1dbc1c582..b6bc927f1 100644 --- a/example/v1beta2/sidecar_features/configmap.yaml +++ b/example/v1beta2/sidecar_features/configmap.yaml @@ -1,3 +1,4 @@ +--- apiVersion: v1 kind: ConfigMap metadata: @@ -6,4 +7,3 @@ metadata: app: myapplication data: my-key: my-value - \ No newline at end of file diff --git a/example/v1beta2/sidecar_features/sidecar.yaml b/example/v1beta2/sidecar_features/sidecar.yaml index 7b3b1f4f7..bd9ae03ee 100644 --- a/example/v1beta2/sidecar_features/sidecar.yaml +++ b/example/v1beta2/sidecar_features/sidecar.yaml @@ -16,11 +16,11 @@ spec: limits: cpu: 101m memory: 128Mi - # redisSecret: - # name: redis-secret - # key: password - # imagePullSecrets: - # - name: regcred + # redisSecret: + # name: redis-secret + # key: password + # imagePullSecrets: + # - name: regcred redisExporter: enabled: false image: quay.io/opstree/redis-exporter:v1.44.0 @@ -38,11 +38,11 @@ spec: imagePullPolicy: Always command: ["/bin/sh", "-c", "sleep 50000"] mountPath: - - name: test - mountPath: /home + - name: test + mountPath: /home ports: - - name: port - containerPort: 9000 + - name: port + containerPort: 9000 storage: volumeClaimTemplate: @@ -57,4 +57,4 @@ spec: - name: test configMap: name: example-configmap - terminationGracePeriodSeconds: 20 #custom terimationgraceperiodseconds + terminationGracePeriodSeconds: 20 # custom terimationgraceperiodseconds diff --git a/example/v1beta2/tls_enabled/redis-cluster.yaml b/example/v1beta2/tls_enabled/redis-cluster.yaml index 7147edd43..cae718b7b 100644 --- a/example/v1beta2/tls_enabled/redis-cluster.yaml +++ b/example/v1beta2/tls_enabled/redis-cluster.yaml @@ -55,4 +55,4 @@ spec: accessModes: ["ReadWriteOnce"] resources: requests: - storage: 1Gi \ No newline at end of file + storage: 1Gi diff --git a/example/v1beta2/tls_enabled/redis-replication.yaml b/example/v1beta2/tls_enabled/redis-replication.yaml index 743e6d7fb..72e5c3f22 100644 --- a/example/v1beta2/tls_enabled/redis-replication.yaml +++ b/example/v1beta2/tls_enabled/redis-replication.yaml @@ -1,3 +1,4 @@ +# yamllint disable-line rule:line-length # Examples of creating a valid TLS certificate can be found at ./config/certmanager via Cert-manager --- apiVersion: redis.redis.opstreelabs.in/v1beta2 diff --git a/example/v1beta2/tls_enabled/redis-standalone.yaml b/example/v1beta2/tls_enabled/redis-standalone.yaml index ca30a243c..64d85061b 100644 --- a/example/v1beta2/tls_enabled/redis-standalone.yaml +++ b/example/v1beta2/tls_enabled/redis-standalone.yaml @@ -1,3 +1,4 @@ +# yamllint disable-line rule:line-length # Examples of creating a valid TLS certificate can be found at ./config/certmanager via Cert-manager --- apiVersion: redis.redis.opstreelabs.in/v1beta2 diff --git a/example/v1beta2/upgrade-strategy/replication.yaml b/example/v1beta2/upgrade-strategy/replication.yaml index 834b2e186..ae7678829 100644 --- a/example/v1beta2/upgrade-strategy/replication.yaml +++ b/example/v1beta2/upgrade-strategy/replication.yaml @@ -8,7 +8,6 @@ spec: kubernetesConfig: image: quay.io/opstree/redis:v7.0.12 imagePullPolicy: IfNotPresent - type: OnDelete # type: RollingUpdate podSecurityContext: runAsUser: 1000 diff --git a/example/v1beta2/upgrade-strategy/standalone.yaml b/example/v1beta2/upgrade-strategy/standalone.yaml index e8e1aacbe..0d514a497 100644 --- a/example/v1beta2/upgrade-strategy/standalone.yaml +++ b/example/v1beta2/upgrade-strategy/standalone.yaml @@ -9,7 +9,7 @@ spec: imagePullPolicy: IfNotPresent updateStrategy: type: OnDelete -# type: RollingUpdate + # type: RollingUpdate podSecurityContext: runAsUser: 1000 fsGroup: 1000 @@ -23,4 +23,4 @@ spec: storage: 1Gi redisExporter: enabled: false - image: quay.io/opstree/redis-exporter:v1.44.0 \ No newline at end of file + image: quay.io/opstree/redis-exporter:v1.44.0 diff --git a/example/v1beta2/volume_mount/configmap.yaml b/example/v1beta2/volume_mount/configmap.yaml index eb5501a23..b6bc927f1 100644 --- a/example/v1beta2/volume_mount/configmap.yaml +++ b/example/v1beta2/volume_mount/configmap.yaml @@ -1,3 +1,4 @@ +--- apiVersion: v1 kind: ConfigMap metadata: @@ -5,4 +6,4 @@ metadata: labels: app: myapplication data: - my-key: my-value \ No newline at end of file + my-key: my-value diff --git a/example/v1beta2/volume_mount/redis-cluster.yaml b/example/v1beta2/volume_mount/redis-cluster.yaml index a7f069d63..15207de89 100644 --- a/example/v1beta2/volume_mount/redis-cluster.yaml +++ b/example/v1beta2/volume_mount/redis-cluster.yaml @@ -1,3 +1,4 @@ +--- apiVersion: redis.redis.opstreelabs.in/v1beta2 kind: RedisCluster metadata: @@ -22,8 +23,8 @@ spec: redisSecret: name: redis-secret key: password - # imagePullSecrets: - # - name: regcred + # imagePullSecrets: + # - name: regcred redisExporter: enabled: false image: quay.io/opstree/redis-exporter:v1.44.0 @@ -49,11 +50,11 @@ spec: resources: requests: storage: 1Gi - volumemount: + volumeMount: volume: - name: example-config configMap: name: example-configmap - mount: + mountPath: - mountPath: /config - name: example-config \ No newline at end of file + name: example-config diff --git a/example/v1beta2/volume_mount/redis-replication.yaml b/example/v1beta2/volume_mount/redis-replication.yaml index 4c081689c..d78030ffe 100644 --- a/example/v1beta2/volume_mount/redis-replication.yaml +++ b/example/v1beta2/volume_mount/redis-replication.yaml @@ -1,7 +1,8 @@ +--- apiVersion: redis.redis.opstreelabs.in/v1beta2 kind: RedisReplication metadata: - name: redis-replication + name: redis-replication spec: clusterSize: 3 # redisConfig: @@ -16,11 +17,11 @@ spec: limits: cpu: 101m memory: 128Mi - # redisSecret: - # name: redis-secret - # key: password - # imagePullSecrets: - # - name: regcred + # redisSecret: + # name: redis-secret + # key: password + # imagePullSecrets: + # - name: regcred redisExporter: enabled: false image: quay.io/opstree/redis-exporter:v1.44.0 @@ -40,11 +41,11 @@ spec: resources: requests: storage: 1Gi - volumemount: + volumeMount: volume: - name: example-config configMap: name: example-configmap - mount: + mountPath: - mountPath: /config name: example-config diff --git a/example/v1beta2/volume_mount/redis-standalone.yaml b/example/v1beta2/volume_mount/redis-standalone.yaml index cbb1a96da..c89d8aa61 100644 --- a/example/v1beta2/volume_mount/redis-standalone.yaml +++ b/example/v1beta2/volume_mount/redis-standalone.yaml @@ -1,3 +1,4 @@ +--- apiVersion: redis.redis.opstreelabs.in/v1beta2 kind: Redis metadata: @@ -15,11 +16,11 @@ spec: limits: cpu: 101m memory: 128Mi - # redisSecret: - # name: redis-secret - # key: password - # imagePullSecrets: - # - name: regcred + # redisSecret: + # name: redis-secret + # key: password + # imagePullSecrets: + # - name: regcred redisExporter: enabled: false image: quay.io/opstree/redis-exporter:v1.44.0 @@ -39,11 +40,11 @@ spec: resources: requests: storage: 1Gi - volumemount: + volumeMount: volume: - name: example-config configMap: name: example-configmap - mount: + mountPath: - mountPath: /config name: example-config